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,
I know that when you have a date field you can filter on relatieve date. Say if I want to see all the people who are under the age of 18 I can filter on date of birth "in the past" and then say 18 years. However If want to see everyone who is older than 18. However I can't find a option that enables me to do so.
I could make some code in the dataset I use but since I have no need of refreshing the dataset so much I would rather solve it in PowerBI as I understand the filter will automaticly adapt to todays date. At least it does in desktop, I have yet to test it on the server.
Solved! Go to Solution.
Hi, @Anonymous
Yes, the use of calculated columns does cause such a situation, so it is recommended to manually refresh the data set every time you open the report.
As a workaround, you can convert the calculated column to measure.Then drag this measure to visual filter pane.
Age = DATEDIFF( MAX('Table'[Date of Birth]),TODAY(),YEAR)
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
Yes, the use of calculated columns does cause such a situation, so it is recommended to manually refresh the data set every time you open the report.
As a workaround, you can convert the calculated column to measure.Then drag this measure to visual filter pane.
Age = DATEDIFF( MAX('Table'[Date of Birth]),TODAY(),YEAR)
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , You can create a new column Age with today
Age = datediff([Date of birth], today(), year)
Use this one filter or visual level filter
Hi Amitchandak,
Thank you for your time.
I was under the impression that when I make a colomn like that I need to refresh the data every day to make it accurate. Thus this solution won't work for me. Or is my understanding of how the dataset in built wrong and does it do all the calculations I make in PowerBI dataset again everytime a open a dashboard on the server or the desktop?
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 | |
98 | |
83 | |
76 | |
65 |
User | Count |
---|---|
120 | |
112 | |
94 | |
84 | |
75 |