The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi,
I have data for which I want to apply a DAX filter of last four month , where my current date is as below.
Current day=today-45 days, kindly help me with the logic for this
Regards,
Solved! Go to Solution.
@Anonymous,
Do you want to show data from last four months(Current day-four months) to Current day(today-45 days)?
If so, create the following columns in your table. Then use the Date Range column in slicer to filter your visuals.
Current Day = TODAY()-45
Date Range = IF('Table'[DateKey]<='Table'[Current Day]&&'Table'[DateKey]>= 'Table'[Current Day]-120,1,0)
However, if you want to calculate last four months using today-4 months, then create Date Range column using the DAX below.
Date Range = IF('Table'[DateKey]<='Table'[Current Day]&&'Table'[DateKey]>=TODAY()-120,1,0)
Regards,
@Anonymous,
Do you want to show data from last four months(Current day-four months) to Current day(today-45 days)?
If so, create the following columns in your table. Then use the Date Range column in slicer to filter your visuals.
Current Day = TODAY()-45
Date Range = IF('Table'[DateKey]<='Table'[Current Day]&&'Table'[DateKey]>= 'Table'[Current Day]-120,1,0)
However, if you want to calculate last four months using today-4 months, then create Date Range column using the DAX below.
Date Range = IF('Table'[DateKey]<='Table'[Current Day]&&'Table'[DateKey]>=TODAY()-120,1,0)
Regards,
Hi, did you try relative date slicer of the preview features? I think this post can help you because it have different approaches
Regards,
Happy to help!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
97 | |
81 | |
62 | |
54 |
User | Count |
---|---|
246 | |
119 | |
114 | |
87 | |
70 |