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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
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.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Top Solution Authors