Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi Power BI Community,
My requirement is to display
1. measure_new for Q2,
2. measure_old for any other quarters except 2022 - Q2
3. when select any quarter + Q2 - it should give the sum of selected quarters(measure_old) + 2022 Q2(measure_new) .
So, I have written this new measure:
test Q2 =
IF(SELECTEDVALUE ( 'date_slicer'[Date].[Year] )="2022",
IF(SELECTEDVALUE ( 'date_slicer'[Date].[Quarter])=="Q2",[measure_new],[measure_old]),
[measure_old])
This works as expected when selection is everything except Q2, which looks like below:
or selection is only Q2:
Challenge:
When the selection includes everything including Q2, my code will just return measure_old which is not expected.
Expected output is (329+67=396)
I am struggling to write correct dax to store result for just the Q2 values in var1, store result of everything selected except Q2 in var 2 and finally sum those var1 and var2.
Another same challenge, in all my dax I am using measure to calculate measure which will slow down the performance ultimately.
Any ideas??
Thank you in advance
@lukiz84 I tried to use VALUES function, but I was not able to store or use it.
This is something I am trying to achieve the task but failures again.
I don't really know what you are trying to achieve, but DATESBETWEEN is not what you think it is, ALLSELECTED neither.
SELECTEDVALUE only returns a value (not blank) when there is ONLY ONE (e.g. Q2) selected.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
86 | |
78 | |
54 | |
39 | |
35 |
User | Count |
---|---|
102 | |
84 | |
48 | |
48 | |
48 |