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 want to put in place the following rule :
if selected period contains full month, display the table otherwise display message
My problem is to display the table if the period contains at least one full month.
For example :
if I chose from 01/september to 29/september, following message is displayed "There is no full month in selected period"
if I chose from 01/sep to 15/oct, the table must be displayed with september data (because the month of september is complete)
Full month calculation
I would like the measure to return 1 if the selected period contains at least 1 full month
Thank you for your help 🙂
Solved! Go to Solution.
Hi @mahsy
Add a custom column to your table to show 1 for first and last day of each month and zero for other days and name it FLDAYS, then write a measure to sum(FLDAYS), if it's more than 2 it means a full month included and if it's less that 2 it means full month not included. If the sum is 2 then check the Day(MIN(Calendar[Date])), if it's 1 it means full month included otherwise full month not included.
Share your PBIX or sample of your table in text format if you ran into any issue to apply this solution.
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Hi @mahsy
Add a custom column to your table to show 1 for first and last day of each month and zero for other days and name it FLDAYS, then write a measure to sum(FLDAYS), if it's more than 2 it means a full month included and if it's less that 2 it means full month not included. If the sum is 2 then check the Day(MIN(Calendar[Date])), if it's 1 it means full month included otherwise full month not included.
Share your PBIX or sample of your table in text format if you ran into any issue to apply this solution.
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
You solved my problem
Merci beaucoup😍
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 |
---|---|
39 | |
25 | |
20 | |
14 | |
8 |
User | Count |
---|---|
71 | |
47 | |
46 | |
20 | |
16 |