Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
mahsy
Helper I
Helper I

Hide matrix depending on selected value

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

mahsy_0-1638953213076.png

 

I would like the measure to return 1 if the selected period contains at least 1 full month

Thank you for your help 🙂

 

1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

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/

 

 

View solution in original post

2 REPLIES 2
VahidDM
Super User
Super User

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😍

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.