Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
85 | |
65 | |
51 | |
45 |
User | Count |
---|---|
217 | |
88 | |
81 | |
65 | |
56 |