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

Sort Data using Monthly days with timestamp filter

I have a table with Daily data collection.

 

MonthJanuaryFebruary
DayCarBusTrucksCarBusTrucks
1150769073043100
227612961810242179
322451034181609337
4223777463943

35

105
51863927659012621
6245393835   
72334880   
8273158718   
912551121017   

 

After loading it to PowerBI desktop, I have transformed it into :

 

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

 

Now I have this graph showcasing attribute (bus in the below case) wise trends, monthly on daily basis:

 

TejasShah_0-1707113668692.png

 

Ask 1 : For the same graph, I need it to be January 1 to 31st and then February daily data to get plotted.

 

I have a filter for the report which is Timesptamp based, so I have created a relationship This table(Day) with Timestamp based table(Day). So, when I filter from 1st Feb to 5th Feb, I get data of Day 1 to 5 for both January and February

 

TejasShah_2-1707114190945.png

 

TejasShah_1-1707114104919.png

 

Ask 2 : How could I sort my data, so that my timesptamp filter could give me only selected dates data.

1 ACCEPTED SOLUTION
v-cgao-msft
Community Support
Community Support

Hi @TejasShah ,

You need to go ahead and create a date column, and use it instead of Table [Day] to create a relationship with Timestamp [Date].

vcgaomsft_0-1707272288488.png

vcgaomsft_1-1707272489297.png

Be sure to place [Month] above the [Day] hierarchy here.

vcgaomsft_2-1707272630520.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

View solution in original post

1 REPLY 1
v-cgao-msft
Community Support
Community Support

Hi @TejasShah ,

You need to go ahead and create a date column, and use it instead of Table [Day] to create a relationship with Timestamp [Date].

vcgaomsft_0-1707272288488.png

vcgaomsft_1-1707272489297.png

Be sure to place [Month] above the [Day] hierarchy here.

vcgaomsft_2-1707272630520.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.