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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
CharlotteCity12
Microsoft Employee
Microsoft Employee

Change the filter on a chart to monthly based on selecting a date in the slicer.

Data - two columns dates and placement #'s

CharlotteCity12_1-1682018315323.png

 

What I want is

When I select a date from a slicer i want to see totals per day within the month where I selected a date..

 

E.G. if I select: 1/3/23, I want to see:

 

CharlotteCity12_2-1682018315328.png

 

 

If I select 2/5/23 I want to see:

CharlotteCity12_0-1682018299060.png

 

2 ACCEPTED SOLUTIONS
MohammadLoran25
Solution Sage
Solution Sage

Hi @CharlotteCity12 ,

Assume you have 'DateTable' which has relationship with your 'PlacementTable'.

And you have 'SecondDateTable' which does not have any relationship to your 'PlacementTable' and 'DateTable'.

 

1-Put Date column from 'SecondDateTable' as your slicer to select the date you want.

 

2-Put Date column from 'DateTable' on your X-Axis.

 

3-Create the measure below and put it as your Y-Axis:

 

NoOfPlacement=COUNTROWS(PlacementTable)

 

 

4-Create the measure below and put it as a "filter on this visual" from "filterpane" and set it to "greater than or equal to 1" :

 

FILTERONVISUAL =
COUNTROWS (
    FILTER (
        DateTable,
        MONTH ( DATETABLE[Date] ) = MONTH ( SELECTEDVALUE ( SECONDDATETABLE[Date] ) )
            && YEAR ( DATETABLE[Date] ) = YEAR ( SELECTEDVALUE ( SECONDDATETABLE[Date] ) )
    )
)

 

 

Then with changing your slicer from step1, the result would be same as what your are looking for. (Do not forget that you can turn on the show items with no data or turn it off on your visual to show or not show the days of the month without any placement)

 

If this answer helped you, mark it as an kudoed accepted solution.

Regards,

Loran

 

View solution in original post

You're welcome @CharlotteCity12 

Happy I could solve it !

View solution in original post

3 REPLIES 3
CharlotteCity12
Microsoft Employee
Microsoft Employee

Loran, You are the best!  THANK you so much for your quick response... It worked perfectly!!!  Dannio

You're welcome @CharlotteCity12 

Happy I could solve it !

MohammadLoran25
Solution Sage
Solution Sage

Hi @CharlotteCity12 ,

Assume you have 'DateTable' which has relationship with your 'PlacementTable'.

And you have 'SecondDateTable' which does not have any relationship to your 'PlacementTable' and 'DateTable'.

 

1-Put Date column from 'SecondDateTable' as your slicer to select the date you want.

 

2-Put Date column from 'DateTable' on your X-Axis.

 

3-Create the measure below and put it as your Y-Axis:

 

NoOfPlacement=COUNTROWS(PlacementTable)

 

 

4-Create the measure below and put it as a "filter on this visual" from "filterpane" and set it to "greater than or equal to 1" :

 

FILTERONVISUAL =
COUNTROWS (
    FILTER (
        DateTable,
        MONTH ( DATETABLE[Date] ) = MONTH ( SELECTEDVALUE ( SECONDDATETABLE[Date] ) )
            && YEAR ( DATETABLE[Date] ) = YEAR ( SELECTEDVALUE ( SECONDDATETABLE[Date] ) )
    )
)

 

 

Then with changing your slicer from step1, the result would be same as what your are looking for. (Do not forget that you can turn on the show items with no data or turn it off on your visual to show or not show the days of the month without any placement)

 

If this answer helped you, mark it as an kudoed accepted solution.

Regards,

Loran

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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