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.
I have created a static version of a date range by repeatedly using a data field in the visual filters but want to write a DAX expression to do the same thing and be dynamic. What I am trying to do is CALCULATE a minimum value of a number column, { MIN(zValus (INT) ) }, within a date range for several sites.
My current 'Filters on this visual' set up is...
The above almost does this but i need to re-write it each month to get what I need. I am to use the date range in a CALCULATE function.
RP = Reporting Period date value from data.
Test Column = CALCULATE(MIN('Table'[zValus]), 'Table'[RP] > [FY Start Date] && 'Table'[RP] < [FY End Date])
I think this is close but I dont understand the error i produces...
A function 'PLACEHOLDER' has been used in a True/False expression that is used as a table filter expression. This is not allowed.
Any help is greatly appreciated.
Solved! Go to Solution.
Would you try this : FY End Date = EOMONTH(TODAY(),-1) - 7
This should calculate the end date dynamically
And then use the updated formula in the CALCULATE function:
Test Column = CALCULATE(MIN('Table'[zValus]), 'Table'[RP] > [FY Start Date] && 'Table'[RP] < [FY End Date])
Sincere thanks @Lamia ! Although your code was not exactly what I needed, it was enough to get me where i needed to be. I will see if it does what I think it will next week. Counting that as a solution for you. This is what I ended up using to limit my data dynamically.
Sincere thanks @Lamia ! Although your code was not exactly what I needed, it was enough to get me where i needed to be. I will see if it does what I think it will next week. Counting that as a solution for you. This is what I ended up using to limit my data dynamically.
Would you try this : FY End Date = EOMONTH(TODAY(),-1) - 7
This should calculate the end date dynamically
And then use the updated formula in the CALCULATE function:
Test Column = CALCULATE(MIN('Table'[zValus]), 'Table'[RP] > [FY Start Date] && 'Table'[RP] < [FY End Date])
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 |
---|---|
110 | |
94 | |
80 | |
67 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |