Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
LFM
Helper III
Helper III

Cant export data from matrix to csv file

Hello. I have an issue. I want to export a matrix to a csv file, because I want to do a check that the data is tranformed in the right way. The export data button is greyed out. 
Export data issue.png
In the matrix I used "New calculation", which makes it not working. Its working if I insert columns or measures. The function I used is unfortunately not working for measure.
I used this function that shows how much the values have changed from the previous date:

 

Delta = 
var pv=NEXT([Sum of Required Margin])
return if(not ISBLANK(pv),format([Sum of Required Margin]-pv,"#"))

 

F.eks. like this

20,05.2024-14020713
17.05.2024-14223426
Change202713


How can I solve this issue?

 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @LFM ,

 

You may need to create index with the help of power query and then try the following measure:

vkongfanfmsft_0-1716519200206.png

 

In this case, you can use the export data function normally.

Delta =
VAR index_ =
    MAX ( Your[Index] )
VAR pre_ =
    CALCULATE (
        MAX ( Your[Value] ),
        FILTER ( ALL ( Your ), Your[Index] <= index_ + 1 )
    )
RETURN
    IF ( NOT ISBLANK ( pre_ ), pre_ - MAX ( Your[Value] ) )

vkongfanfmsft_1-1716519261079.png

 

 

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @LFM ,

 

You may need to create index with the help of power query and then try the following measure:

vkongfanfmsft_0-1716519200206.png

 

In this case, you can use the export data function normally.

Delta =
VAR index_ =
    MAX ( Your[Index] )
VAR pre_ =
    CALCULATE (
        MAX ( Your[Value] ),
        FILTER ( ALL ( Your ), Your[Index] <= index_ + 1 )
    )
RETURN
    IF ( NOT ISBLANK ( pre_ ), pre_ - MAX ( Your[Value] ) )

vkongfanfmsft_1-1716519261079.png

 

 

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors