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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Does it measure whether another column goes back blank?

So I have a fact table with data per ID for different metrics. I have a measure that calculates the proportions based on the data in the fact table. This fact table also has a column for 2020 Current, Budget 2020, and Variation 2020 to the Budget named Year Type.

I have another table that groups IDs by country.

I'm creating a matrix with Country as the top level in columns and Year type as the second level in columns. Then all my measurement proportions are values that are displayed as rows.

Therefore, it would show US as a top-level column, and then the column level below would be 2020 Current, 2020 Budget, and 2020 Variation to Budget.

This works well, but the deviation to the budget is misleading. The calculation works correctly, but the variance must be calculated differently. Here's an example of my data:

2020-05-04_15-45-01.jpg

So you can see in the ratio column that the measure would correctly calculate for deviation (Earnings/Price), however, the result is not correct. Must be 25%-10%.

I need my data structured as Country at Level 1 for Columns and Year Type for Level 2 in a matrix. I can try to create a measure that makes the variance as set above (25%-10%), or if I could leave the result blank because the current result is a bit misleading.

1 ACCEPTED SOLUTION
Wimverh
Resolver IV
Resolver IV

Hi @Anonymous ,

Can you try the following measure

Ratio = 
VAR _earnings = calculate(sum(myTable[Amount]),Account="Price")
VAR _price = calculate(sum(myTable[Amount]),Account="Earnings")
RETURN
if(Account="Earnings",
DIVIDE(_earnings,_price),
BLANK()
)

View solution in original post

1 REPLY 1
Wimverh
Resolver IV
Resolver IV

Hi @Anonymous ,

Can you try the following measure

Ratio = 
VAR _earnings = calculate(sum(myTable[Amount]),Account="Price")
VAR _price = calculate(sum(myTable[Amount]),Account="Earnings")
RETURN
if(Account="Earnings",
DIVIDE(_earnings,_price),
BLANK()
)

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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