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.
Hello,
I have a matrix with three fields in the rows... Level1, Level 2 and Level 3. And a Amount column. And a date slicer on the top.
I want my Amount column to show YTD for a particular value "212" in Level 3 and the Actuals for the date selected in slicer for rest of the vales of Level 3.
I am writing a DAX for a column:
Amount= If( level3= "212", TOTALYTD(SUM(AMT), Dates(Date)), AMT)
But it is not working.
What am I doing wrong?
Solved! Go to Solution.
For those who might be facing same issue:
I got the solutions for this:
Amount= IF(SELECTEDVALUE(level3)= "212", TOTALYTD(SUM(AMT), Dates(Date)), SUM(AMT))
Amount(fixed)= SUMX(VALUE(Level3), [Amount])
Pull this Amont(fixed) measure in your Matrix and you will get the desired Total.
@Tanushree_Kapse , Try like
Amount= If( max(Table[level3])= "212", TOTALYTD(SUM(Table[AMT]), Dates(Date)), sum(Table[AMT]))
Hi @amitchandak ,
No that didn't work, gave the same results as before.
I rather created a measure for this :
Amount= IF(SELECTEDVALUE(level3)= "212", TOTALYTD(SUM(AMT), Dates(Date)), SUM(AMT))
It gave me YTD value for 212, but now the Matrix Total at bottom is not correct, it is still giving me the older one not the one with 212's YTD.
What can be done for this?
For those who might be facing same issue:
I got the solutions for this:
Amount= IF(SELECTEDVALUE(level3)= "212", TOTALYTD(SUM(AMT), Dates(Date)), SUM(AMT))
Amount(fixed)= SUMX(VALUE(Level3), [Amount])
Pull this Amont(fixed) measure in your Matrix and you will get the desired Total.
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 |
---|---|
47 | |
26 | |
19 | |
15 | |
10 |
User | Count |
---|---|
57 | |
50 | |
44 | |
21 | |
19 |