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.
Hi all,
I'm trying to create a measure that will calculate the delta between selected planning version. My simplified datamodel is as follows:
Version | value |
Planning_1 | 10 |
Planning_2 | 20 |
Planning_3 | 25 |
Planning_4 | 8 |
Result should be usable in a matrix visual:
column1: planning version A
column2: planning version b
column 3: delta
Thanks you very much for your respons!
Regards,
Paul Theunissen
Solved! Go to Solution.
Hi @theunissenp
One idea,
create the measure
Measure =
var _count= COUNTX(ALLSELECTED('Table'[Version]),[Version])
var _max= IF(_count=2,MAXX(ALLSELECTED('Table'),'Table'[value]))
var _min= IF(_count=2,MINX(ALLSELECTED('Table'),'Table'[value]))
return
IF(HASONEVALUE('Table'[Version]),SUM('Table'[value]),_max-_min)
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi @theunissenp
One idea,
create the measure
Measure =
var _count= COUNTX(ALLSELECTED('Table'[Version]),[Version])
var _max= IF(_count=2,MAXX(ALLSELECTED('Table'),'Table'[value]))
var _min= IF(_count=2,MINX(ALLSELECTED('Table'),'Table'[value]))
return
IF(HASONEVALUE('Table'[Version]),SUM('Table'[value]),_max-_min)
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Thanks! This helps a lot. One more question. Is it also possible to create a measure that calculates a difference for multiple dimension: Version, cost center and year, quarter and month?
example:
In the matrix the expected result shoud be:
when planing_1 and planning_2 are selected:
Hi:
I looked up a potential solution for you. Please check out this previous answer and I hope this helps!
Thanks for your help. Unfortunately this solution doesn't work for me... I get the message that I want to compare text with numbers
Hi Paul:
Can you give sme examples of expected results? I'm not sure what you want to compare your selected value to? Thanks..
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
45 | |
26 | |
22 | |
13 | |
8 |
User | Count |
---|---|
73 | |
51 | |
45 | |
16 | |
12 |