Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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..
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
8 |