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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
TejasShah
Helper I
Helper I

Filter data as per slicer without timestamp properties

I have a table on a spreadsheet with the following data:

 

MonthJanuaryFebruary
DayCarBusTrucksCarBusTrucks
1150769073043100
227612961810242179
322451034181609337
422377746394335105
51863927659012621
6245393835   
72334880   
8273158718   
912551121017   

 

Which has been transformed to below when loaded into PowerBI :

 

MonthAttributeDayMonthNumValue
JanuaryBus1169
JanuaryBus2129
JanuaryBus31103
JanuaryBus4177
JanuaryBus5192
JanuaryBus6193
JanuaryBus7188
JanuaryBus8158
JanuaryBus91112
JanuaryCar111507
JanuaryCar212761
JanuaryCar312245
JanuaryCar412237
JanuaryCar511863
JanuaryCar612453
JanuaryCar712334
JanuaryCar812731
JanuaryCar911255
JanuaryTrucks110
JanuaryTrucks21618
JanuaryTrucks31418
JanuaryTrucks41463
JanuaryTrucks51765
JanuaryTrucks61835
JanuaryTrucks710
JanuaryTrucks81718
JanuaryTrucks911017
FebruaryBus1243
FebruaryBus2221
FebruaryBus323
FebruaryBus4235
FebruaryBus5226
FebruaryCar12730
FebruaryCar221024
FebruaryCar321609
FebruaryCar42943
FebruaryCar52901
FebruaryTrucks12100
FebruaryTrucks2279
FebruaryTrucks3237
FebruaryTrucks42105
FebruaryTrucks5221

 

I have my maximum data with timestamp, so I am using a slicer with timestamp properties, where as my excel sheet data just has Day and Month as my Slicer properties.

 

TejasShah_0-1707139399528.png

 

And if I select just the dates of February from the Slicer, I still get those days from January as well:

 

TejasShah_1-1707139486753.png

 

Requesting someone to please guide me through, I have also formed the relationship of Many to Many with Excel table(Day) with the other table with timestamp(Day).

1 ACCEPTED SOLUTION
AndrewPF
Helper V
Helper V

If I have understood the problem properly, then you should be able to resolve this by creating a new date column in Power Query using the day and month already present. 

Then use this new column in your slicer, and change the settings to a date range, or "between". 

View solution in original post

4 REPLIES 4
v-xuxinyi-msft
Community Support
Community Support

Hi @TejasShah 

 

You can create a measure with if to determine whether the Month, day of the data in the table is the same as the Month, day of the slicer, the same show 1, not the same show 0, and then put the measure into the visual-level filters, set up show items when the value is 1.

 

You can refer to the following link for details on how to do this: 

Solved: I want to show specific year ranges (start year to... - Microsoft Fabric Community

 

If I've misunderstood you, please provide sample data of the Timestamp table: How to provide sample data in the Power BI Forum - Microsoft Fabric Community . Or show it as a screenshot or pbix. Please remove any sensitive data in advance. If uploading pbix files please do not log into your account. We can better understand the problem and help you.

 

Best Regards,
Community Support Team _Yuliax

 

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

Thank you @v-xuxinyi-msft , I will surely try out this solution as well, though @AndrewPF 's comment was much more a convenient way out, since I already had day & month columns in my data.

AndrewPF
Helper V
Helper V

If I have understood the problem properly, then you should be able to resolve this by creating a new date column in Power Query using the day and month already present. 

Then use this new column in your slicer, and change the settings to a date range, or "between". 

Thank you @AndrewPF , this worked well! I just couldn't think of that solution while I was stuck with my visuals, thank you!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

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