Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi Team,
I just want to know how do I create a table in power bi or a graph, wherein I should be able to export the data as CSV.
Expected Output:
I want the exported CSV to have these column:
Meter ID (Meter_identifier) | New Meter Reading (newMeteredQuantity) | Previous Meter Reading (previousMeteredQuantity) |
KM101 | 200 | 0 |
KM102 | 100 | 0 |
KM201 | 100 | 0 |
Formula:
KM101: Monthly sum of _value + _value_b
KM102: Monhtly sum of _value
KM201: Monthly sum of _value_b
New_Meter Reading: Shows the monthly values.
Previous Meter reading: Shows 0 by default
The excel data which is the source is attached here:
sample_Data.csv
How do I create a measure to display it in the table in the PowerBi so as to export it as csv. ?
Hi @nishad1092 ,
Exporting data from a report visual in Power BI Desktop is straightforward. When you export the data, Power BI creates a .csv file with the data.
Create measures like the following:
K101_M =
CALCULATE (
SUM ( Tabelle1[_value] ),
FILTER (
Tabelle1,
Tabelle1[month] = SELECTEDVALUE ( Tabelle1[month] )
&& Tabelle1[year] = SELECTEDVALUE ( Tabelle1[year] )
)
)
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi
Thank you so much.
I'm trying to implement your solution.
But is there a way to bring the KM values to the left; I want the CSV as the following:
Meter ID (Meter_identifier) | New Meter Reading (newMeteredQuantity) | Previous Meter Reading (previousMeteredQuantity) |
KM101 | 200 | 0 |
KM102 | 100 | 0 |
KM201 | 100 | 0 |
I want the values "KM101, KM102, KM201" to be listed under Meter ID column. Please make changes to the table as well. I will implement it.
Hi @nishad1092 ,
I'm sorry I forgot to share the link to the relevant document. I have added it at the end of the reply. I have exported table visual so that it can be displayed in the order of "KM101, KM102, KM201".
Export data from a Power BI visualization - Power BI | Microsoft Learn
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
I exported the CSV from the pbix you shared.
How do I get the exported CSV with the KM101, KM102... Values as rows.
Hi@ @nishad1092 ,
You can create a visual like the one you want and then export it.
Exporting data from a report visual in Power BI Desktop is straightforward. When you export the data, Power BI creates a .csv file with the data.
Solved: Excel Export - Data with Current layout option is ... - Microsoft Fabric Community
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-rongtiep-msft
Thank you for your guidance,
What I meant by the previous reply is: How do I get the expected CSV with the below data:
Because When I export CSV using your solution, I get the KM values as separate columns, I need that KM values as the row itself under column name 'Meter ID' and then the corresponding KM values would be monthly values (calculated as per the KMs equation which I mentioned in the post)
Expected output:
I need a table or matrix (later I want the CSV data),
the new table will be:
Meter ID will have three rows KM101, KM102, KM201:
KM101 result is: SUM of Monthly wise data of _value + _value_b
KM102 result is: SUM of Monthly wise data of _value
KM201 result is: SUM of Month wise data of _value_b
So far I got this matrix:
But when I export as CSV, its all messy, and also column name I can't get it as MeterID.
User | Count |
---|---|
93 | |
86 | |
68 | |
62 | |
58 |
User | Count |
---|---|
150 | |
113 | |
95 | |
80 | |
72 |