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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply

Measure

Hi all,

 

I have two columns in Desktop, one of date and one of a price.

 

I have created a basic matrix table as attached but I want a DAX/Measure to show the % difference next to it in a new column of the two prices between both dates.

 

Is this possible?

 

ThanksCapture.PNG

3 REPLIES 3
Anonymous
Not applicable

@TheLegendTamer,

I make a test in the following sample table and create the calculated columns as below.

1.JPG2.JPG

Index = CALCULATE(COUNTROWS(Table), FILTER(Table,Table[Date]<=EARLIER(Table[Date]) && Table[CoverType]=EARLIER(Table[CoverType])))

% Difference = var previous=CALCULATE(FIRSTNONBLANK(Table[Value],Table[Value]),FILTER(Table,Table[Index]=EARLIER(Table[Index])-1 && Table[CoverType]=EARLIER(Table[CoverType]) )) return IF(ISBLANK(previous),BLANK(),(Table[Value]-previous)/previous)

If the above DAX don't help, please share sample data of your original table.



Regards,
Lydia

Hi,

 

Thanks for the reply.

 

The %Difference column is all blank I'm afraid.

 

Unable to share table due to most of data in it but thank you anyway.

Anonymous
Not applicable

@TheLegendTamer

You can share me dummy data of your table, and send me the data via Private Message.

Regards,
Lydia

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.