- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to apply conditional formatting while exporting the data into an excel file using query.
Hi,
We have got a requirement where we need to export the table visual data into an excel file as an attachment and send it in an email.
For this, we have used 'Power Automate' scheduled flow and choose 'Run a query against the dataset' option to get the data instead of exporting the table visual directly.
In the query text, we wrote a query with CALCULATETABLE() function with all the required columns. Here we want to set conditional formatting for a few of the columns and the same formatting should be seen in the exported excel file. Is there an option to apply conditional formatting in the query?
Kindly help us in this regard.
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, as I said, the queries generated have no formatting at all, just data. Then the visual author translates that data into the conditional formatting you see. You'd have to apply that same logic on the raw data you extracted.
Power BI queries are just data. 100% of any formatting is done exclusively by the visual, whether it is you changing colors in a bar chart, the background color, or conditional formatting. The Vertipaq engine you query - in the viz, or via Power Automate - has no clue about formatting.
Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI Reporting- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can get the conditional formatting values. You can see how Power BI does this by creating a conditional format, then using Performance Analyzer to look at the query generated for the visual.
But it is 100% data. No formats at all. The visual instead knows to interpret the column for formatting. Then the report layer translates those numbers into the colors you chose.
So no, the query itself is pure data, even in Power BI. You'd need to format in Excel.
Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI Reporting- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thankyou @edhans for the response.
Do we have any other way to apply conditional formatting before we export the data?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, as I said, the queries generated have no formatting at all, just data. Then the visual author translates that data into the conditional formatting you see. You'd have to apply that same logic on the raw data you extracted.
Power BI queries are just data. 100% of any formatting is done exclusively by the visual, whether it is you changing colors in a bar chart, the background color, or conditional formatting. The Vertipaq engine you query - in the viz, or via Power Automate - has no clue about formatting.
Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingHelpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - January 2025
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
Subject | Author | Posted | |
---|---|---|---|
06-13-2024 12:55 AM | |||
07-01-2024 01:11 PM | |||
11-30-2023 06:42 PM | |||
08-09-2024 01:24 AM | |||
08-09-2024 08:28 AM |
User | Count |
---|---|
21 | |
17 | |
11 | |
10 | |
10 |
User | Count |
---|---|
35 | |
28 | |
19 | |
17 | |
13 |