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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Help with calculating variance the current quarter and last quarter on a matrix visualization

Good day I need help with calculating variance of the current quarter and previous quarter in percentage, I have two tables Product table and Dim_Date Table, I will attach a screenshot of the expected output , product table contains the Product Description and quantity of products sold(Units), Time of purchase(DD/MM/YYYY) as a date, and I have used the measure SUMX('Product',[Quantity] to get the total quantity of each product, I  also used the Dim_table to dynamically assign quantity of units sold to the correct Quarter using the relationship between the time purchased and full date key on the dim date table I want to calculate the variance of unit sales  % between the current quarter and the previous quarter example Variance %=Current quarter - Previous Quarter/Previous Quarter , The resulting measure Variance percentage should be a column on the matrix I have attached a screen short of the expected output I hope I was descriptive enough if further clarity is needed I’m glad to provide further detail, Thank you in advance😁😁


Expected out in matrix visualisation 

 Expected Results.PNG 

1 ACCEPTED SOLUTION
sturlaws
Resident Rockstar
Resident Rockstar

Hi,

 

assuming your Dim_Date looks someting like this:

sturlaws_0-1655100527002.png


this measure

sturlaws_1-1655100599479.png

 

returns this

sturlaws_2-1655100747328.png

 

 

Cheers,
Sturla

If this post helps, then please consider Accepting it as the solution. Kudos are nice too.

View solution in original post

1 REPLY 1
sturlaws
Resident Rockstar
Resident Rockstar

Hi,

 

assuming your Dim_Date looks someting like this:

sturlaws_0-1655100527002.png


this measure

sturlaws_1-1655100599479.png

 

returns this

sturlaws_2-1655100747328.png

 

 

Cheers,
Sturla

If this post helps, then please consider Accepting it as the solution. Kudos are nice too.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.