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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Randcharles
Frequent Visitor

How to - Cascading customized date filter on Power BI

Hi all,

I would like to reproduce the same customized visual date filter as below on my report  :

Filtre mensuel personnalisé en cascade.png

Filtre hebdo en cascade personnalisé.png
So, according to the "Periodicity" that you select from the Periodicity dropdwon filter, your second segment "Period" should allow you to choose a different date range. For example, when you select "Mensuel" ( Monthly) from "Periodicité", the "Periode" segment should allow you to select only Monthly Column ( preformatted as " YYYY-MMMM").  The same for "Hebdo" (Weekly) from Periodicity, you should be able to select Weekly period ( preformatted as YYYY-W-WeekNumber) from the second segment.
I have tried to use "Field Parameter" to build the first segment "Periodicity" which may allow user to choose the " Weekly, Monthly, Daily" like this : 

 

Périodicité = {
("Quotidien", NAMEOF('Dim_Date'[Quotidien]), 0),
("Hebdo", NAMEOF('Dim_Date'[Hebdo]), 1),
("Mensuel", NAMEOF('Dim_Date'[Mensuel]), 2)
}

 

So I have the table created from this field parameter on my data model.

And in my Dim_Date table, I created 3 custom columns : Daily ( dd-mm-yyyy), Weekly (YYYY-W-WeekNumber) and Monthly (YYYY-MMMM). 

Dim_Date.png

 

For the moment, there is no relationship between my Dim_Date and My Periodicite table. 

I tested within my report, it doesn't work. I can't make dependance on my 2 tables for cascading the filter from "Periodicity" to my column inside Dim_Table : Hebdo(week), Daily(Quotidien), Monthly (Mensuel) according to selected periodicity type.

 

Does anyone know how to implement those filter option on the Power BI report ? 
What is the missing step on my process if it's the right one.
Thanks in advance.

2 ACCEPTED SOLUTIONS
v-heq-msft
Community Support
Community Support

Hi @Randcharles ,
Based on your description, you want to create parameters to display different columns as slicers. If measure is used based on the selected parameters, the slicer does not support measure. If you force the parameter to use other fields, the slicer will not display the column in its entirety.
So, there are two ways you can do this:
First, you can use the unpviot three columns to make the column names in the same column, so that you can build a slicer with the two columns after unpviot.

vheqmsft_0-1720580487029.png

vheqmsft_1-1720580502660.png

 

 


In the second way, you can continue to use the parameters, and in the second you can replace the slicer with a table and put the parameters into the table visualization. After that, you can click on the data on the table to filter
it

vheqmsft_2-1720580521228.png

 

Best regards,
Albert He

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

Randcharles
Frequent Visitor

Hi @v-heq-msft ,

Thanks a lot for your help and advice. 
It works for me. I have used the first option by using parameter with unpivot columns.
Great idea! 

View solution in original post

2 REPLIES 2
Randcharles
Frequent Visitor

Hi @v-heq-msft ,

Thanks a lot for your help and advice. 
It works for me. I have used the first option by using parameter with unpivot columns.
Great idea! 

v-heq-msft
Community Support
Community Support

Hi @Randcharles ,
Based on your description, you want to create parameters to display different columns as slicers. If measure is used based on the selected parameters, the slicer does not support measure. If you force the parameter to use other fields, the slicer will not display the column in its entirety.
So, there are two ways you can do this:
First, you can use the unpviot three columns to make the column names in the same column, so that you can build a slicer with the two columns after unpviot.

vheqmsft_0-1720580487029.png

vheqmsft_1-1720580502660.png

 

 


In the second way, you can continue to use the parameters, and in the second you can replace the slicer with a table and put the parameters into the table visualization. After that, you can click on the data on the table to filter
it

vheqmsft_2-1720580521228.png

 

Best regards,
Albert He

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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

Top Solution Authors
Top Kudoed Authors