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 a table containing dates ranging from 1st Jan 2018 ro 31st Dec 2021. I want to write a measure which will filter the table and return all the dates greater than TODAY(). I want to plot a graph against all the upcoming dates in the future.
Is there a way I can do this?
I don't want to use a slicer.
Solved! Go to Solution.
@Anonymous
There are a few way to write that dax, you can create a measure or a calculate column. Try:
Measure = Calculate(sum([Date]),Filter(All(Table), [Date]>Today()))
OR
Column = IF([Date]>TODAY(),[Date],BLANK())
Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Anonymous
I wouldn't use a slicer neither a measure. I will filter it as below.
Hope it resolves your issue? Did I answer your question? Mark my post as a solution! Appreciate your Kudos, Press the thumbs up button!! Linkedin Profile |
@Anonymous
There are a few way to write that dax, you can create a measure or a calculate column. Try:
Measure = Calculate(sum([Date]),Filter(All(Table), [Date]>Today()))
OR
Column = IF([Date]>TODAY(),[Date],BLANK())
Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
@Anonymous , better to use relative date slicer
https://docs.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range
As a slicer or at visual or page level filter.
measure can group data into one row
Like
measure =
var _max = today()
return
CALCULATE(
COUNT ('Table'[Value]),FILTER(ALLSELECTED('Table'),'Table'[Date] <= _max))
or
measure =
var _max = today()
return
CALCULATE(
COUNT ('Table'[Value]),FILTER(('Table'),'Table'[Date] <= _max))
Also, refer to this video
https://www.youtube.com/watch?v=duMSovyosXE
@Anonymous ,
Try using below measure
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 |
---|---|
114 | |
100 | |
83 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |