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.
Here is what my data look like now. I have been trying to create a new measure that for each day in December, it will show the same number 122251, which is the total. The number changes by month of course. Thanks!
Hi @yiying
Try this MEASURE
Measure = CALCULATE ( [CountMeasure], FILTER ( ALL ( TableName ), MONTH ( TableName[Dates] ) = MONTH ( SELECTEDVALUE ( TableName[Dates] ) ) && YEAR ( TableName[Dates] ) = YEAR ( SELECTEDVALUE ( TableName[Dates] ) ) ) )
Thank you so much it works!!
Another question. I also have a attribute "Type". When I add the filter , the new measure I created does not change. What should I do?
HI @yiying
Try Replacing ALL with ALLEXCEPT....
Check this revised code
Measure = CALCULATE ( [CountMeasure], FILTER ( ALLEXCEPT ( TableName, TableName[Attribute] ), MONTH ( TableName[Dates] ) = MONTH ( SELECTEDVALUE ( TableName[Dates] ) ) && YEAR ( TableName[Dates] ) = YEAR ( SELECTEDVALUE ( TableName[Dates] ) ) ) )
Alternatively this should work as well
Just replace ALL(TableName) with All(TableName[Dates])
Measure = CALCULATE ( [CountMeasure], FILTER ( ALL ( TableName[Dates] ), MONTH ( TableName[Dates] ) = MONTH ( SELECTEDVALUE ( TableName[Dates] ) ) && YEAR ( TableName[Dates] ) = YEAR ( SELECTEDVALUE ( TableName[Dates] ) ) ) )
Thank you! The allexcept works. But the on with all does not work for some reason.
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 |
---|---|
107 | |
96 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |