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.
Currently I'm using this DAX formula on a Card and it's working:
CALCULATE( DISTINCTCOUNT(Sales[DocumentNumber]); FILTER(Sales; Sales[Field1] = "1" && Sales[Field2] = VALUE(1)) )
But, I want to combine it with the function SAMEPERIODLASTYEAR, where I've tried:
CALCULATE( DISTINCTCOUNT(Sales[DocumentNumber]); FILTER(Sales; Sales[Field1] = "1" && Sales[Field2] = VALUE(1) && SAMEPERIODLASTYEAR (Dates[Date])) )
And the result doesn't change, when it acutually has to change, so, how can I do this?
Thanks!
Solved! Go to Solution.
Please update the formula as below and try again.
Measure = CALCULATE ( DISTINCTCOUNT ( Sales[DocumentNumber] ); FILTER ( ALL ( Sales ); Sales[Field1] = "1" && Sales[Field2] = VALUE ( 1 ) ); SAMEPERIODLASTYEAR ( Dates[Date] ) )
Best Regards,
Herbert
Hi, please , i was trying a formular for: calculate , in sameperiodlastyear but with removing the day 29 of April (2019 not exsiting),
whihc one i have to use?
Please try to use following DAX formula.
Measure = CALCULATE ( DISTINCTCOUNT ( Sales[DocumentNumber] ); FILTER ( Sales; Sales[Field1] = "1" && Sales[Field2] = VALUE ( 1 ) ); SAMEPERIODLASTYEAR ( Dates[Date] ) )
Best Regards,
Herbert
Trying that gives (Blank), which is incorrect because it should give a digit.
I know it's wrong because filtering by 2014 the result in the "Current year" Card visual (for instance) gives 3000, and the same visual filtering by 2013 gives 800, but, using the "Last year" Card visual and filtering by 2014 with your solution, gives (Blank), when it should give 800.
I have tried other solutions but I can't achieve this dumb thing 😕
Please update the formula as below and try again.
Measure = CALCULATE ( DISTINCTCOUNT ( Sales[DocumentNumber] ); FILTER ( ALL ( Sales ); Sales[Field1] = "1" && Sales[Field2] = VALUE ( 1 ) ); SAMEPERIODLASTYEAR ( Dates[Date] ) )
Best Regards,
Herbert
It was that!
Thank you!!
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 |
---|---|
112 | |
100 | |
76 | |
74 | |
49 |
User | Count |
---|---|
145 | |
108 | |
107 | |
89 | |
61 |