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.
Hi everyone,
I’ll thank you if you could tell me how could I replace a date value in a formula by the result of a value slicer
When I insert the date value I get the desired result
Sales = CALCULATE(COUNTROWS(sales);
FILTER(ALL(sales);sales[date]<DATE(2019;4;4));
FILTERS(sales[date])
)
But if I replace the date with SELECTEDVALUE I get the table empty
Sales = CALCULATE(COUNTROWS(sales);
FILTER(ALL(sales);sales[date]<SELECTEDVALUE(Sales[date]));
FILTERS(sales[date])
)
Thanks again
Solved! Go to Solution.
Hi @Anonymous ,
You could refer to below steps:
Sample data:
Create a new table:
New Table = VALUES(Table1[Date])
Use the New table date as slicer and create below measure:
Measure = CALCULATE(SUM(Table1[Value]),FILTER('Table1','Table1'[Date]<=SELECTEDVALUE('New Table'[Date])))
Result:
Regards,
Daniel He
Hi @Anonymous ,
You could refer to below steps:
Sample data:
Create a new table:
New Table = VALUES(Table1[Date])
Use the New table date as slicer and create below measure:
Measure = CALCULATE(SUM(Table1[Value]),FILTER('Table1','Table1'[Date]<=SELECTEDVALUE('New Table'[Date])))
Result:
Regards,
Daniel He
thank you @v-danhe-msft
I get the result still empty. I'll check it again carefully in case i miss something
Hi @Anonymous ,
Could you have used the data column in new table(created by dax) as the slicer? And please check with your dax formula.
Regards,
Daniel He
At the end, I redesinged a couple of concepts and measures and got the result in other way.
Thanks a lot fot the help, @v-danhe-msft
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 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |