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
amfc
Frequent Visitor

Change Slice and then change Querie

Hi Team,

I have data separated by month on Power Bi queries.. How can i fix the problem, on the slicer when i press January he will read the data querie of january, when i press Febraury, he will get tje data from February and so on... 

 

Thank you

1 ACCEPTED SOLUTION

OK. I see you have tables by month name and you want filter by month for your graph. The best practice is to comine all your month based tables and then pick fields in combined table:

1. Go to Power Query

xzmiche_0-1630540230695.png

2. Append Query as New

xzmiche_1-1630540340457.png

xzmiche_2-1630540411473.png

3. You will get combined table. Close Power Query

4. Pull the fields in Combined table to your graph and slicer

 

 

View solution in original post

6 REPLIES 6
Syndicate_Admin
Administrator
Administrator

if Date.IsInCurrentMonth( [Date] )

Like this
then "Current Month"
else [Month]

 

  set the slicer to "Current Month", when the month changes and the dataset will get refreshed & slicer's "Current Month" selection can remain the same. What "Current Month" get changed after it and you will find the proper outputs

Hi, 

Where is write this code?

Thank you

 

if Date.IsInCurrentMonth( [Date] )

Like this
then "Current Month"
else [Month]

amfc
Frequent Visitor

Hi xzmiche, Yes, but when i press January i need to see only January values, and when i press on February i need to see only february values... February.pngJanuary.png

OK. I see you have tables by month name and you want filter by month for your graph. The best practice is to comine all your month based tables and then pick fields in combined table:

1. Go to Power Query

xzmiche_0-1630540230695.png

2. Append Query as New

xzmiche_1-1630540340457.png

xzmiche_2-1630540411473.png

3. You will get combined table. Close Power Query

4. Pull the fields in Combined table to your graph and slicer

 

 

amfc
Frequent Visitor

Thank you xzmiche. It works...

xzmiche
Resolver I
Resolver I

It's true when you pick month field in your table as slicer field to filter other visuals. When you do not select any month, your visuals will show all data and when you select one, the visuals will only show the month your selected.

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.

Top Solution Authors
Top Kudoed Authors