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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors