web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Help with a Condition ...
Power Automate
Unanswered

Help with a Condition Statement

(0) ShareShare
ReportReport
Posted on by 10
Hi,
 
I'm trying to create a condition statement for my flow that pulls in data from Power BI and then I format it and create a csv and then email it out.  Its a flow that runs weekly and some weeks there is data to go out and others not.  I think a condition statement is the way to go - meaning it would be something like if the output from the CSV create has data in it - then an email function that sends out the report.  If the create CSV is null/empty - then I create an email that simply says - No data this week, for example.  
 
I tried to setup my condition to say if the Output from the Create CSV is Null than send out email saying No data but the Yes had send out the full email with attachment.  It ended up doing the opposite of what it was supposed to do.  I know I could probably just flip the logic but I don't trust its doing what it should.  Any thoughts on how to do this?
Categories:
I have the same question (0)
  • Mark Nanneman Profile Picture
    993 Moderator on at
    Can you post some screenshots of your flow, and data from one of the runs?

    Especially show your condition and any expressions you're using there.

    Also, where is your CSV coming from / how are you generating it?
     
     
  • CU05121516-0 Profile Picture
    10 on at
    The flow queries Power BI and pulls a dataset from there.  I then use a Select statement to format it and then create the CSV file and Email it out in the end.  
     
    Here is a pic:
     
     
    I chose to create a condition here because the issue I want to address is that sometimes the data retrieved from Power BI will be blank meaning we just didn't have any data last week for this table its pulling from - its a week to week table and not historical.  So what I am trying to do is say - When the data pulled from Power BI is Null or Blank - then send out an email that says its Blank, if its not Null/Blank - then send out the CSV file created in the step. 
     
    Here is the condition code I tried:
     
     
    I also tried to put the condition right after the Power BI Dataset query step.  The issue I am having is how to frame the language I think - assuming this is the right way to do this - because whether I put Null as seen above or '[]" which is all the body output shows - it still just goes to the False condition meaning my language is not correctly saying if the output is empty.   Thoughts?
  • CU05121516-0 Profile Picture
    10 on at
    bump...any help would be appreciated! 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 976

#2
Valantis Profile Picture

Valantis 863

#3
Haque Profile Picture

Haque 547

Last 30 days Overall leaderboard