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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors