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
johnbasha33
Solution Sage
Solution Sage

Multiple date columns in Fact table

my fact table has 4 date columns like as below

 

i have created a caleder table and joined all 4, obviously 3 of them are inactive and only one is active.

 

my ask is to have only one date slicer to filter the table data for all these date columns, i know that it works if i use userelationship, but that is when i want to calculate something. but here is dont want any calculations, my fact table has many columns, it is a simple table visual with different columns, user want to use only one date slicer so the below table visual will be filtered to only that for all the different date columns, how can we do that? any thoughst?

 

@amitchandak @lbendlin @Greg_Deckler @Daniel29195 @Ritaf1983 @Idrissshatila @Ahmedx @AlexisOlson 
@ltsantos @ybarsabal

 

 

johnbasha33_0-1708702038598.png

 

6 REPLIES 6
Ahmedx
Super User
Super User

I don't quite understand what you need
If you selected 9/5/2012 , then what result are you expecting?
and if you choose 2/7/2024 then what are you waiting for

@Ahmedx basically if i sleect one date, say like 9/5/2012, my below table should be filtered for  the same date for those 4 date columns, inception date, submitted date, etc.. 

@johnbasha33 , In this better not to join the date table and try like

 

Measure =

var _max = maxx(allselected(Date), Date[Date])

return

calculate([Your Measure], filter(Table, Table[Inception Date] =_max && Table[ResolutionDate] =_max)))

you can use OR (||) , also add other dates as per need

Daniel29195
Super User
Super User

@johnbasha33 

 

one approach you can take is to unpivot your table so that you will have : 
datetype with values { inceptiondate,  resolutiondate , submitteddate  a, dateoflastupdate ) 

and the second column  is the dates . 

this way you will have one date column to link to your dimdate and the other column specifiyin the type of the date on the current row .

 

this can be done in power query under transform -->  unpivot columns.

 

 

hope this helps .

 

 

 

If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠 

@Daniel29195 Hi, thanks for taking your time to respond, the problem is, i am using existing semantic model as my source in the report, i dont have any control as it is direct query and we cant ask for import mode due to sensitivity issues. looks like it is not possible?  

@johnbasha33 

you can maybe ask  the backend team to unpivot the table for you , but keep in mind that the nb of rows of this table would be multiplied by 4 . 

 

other than this, im not sure if you can achieve your requirement in another way .

 

plus, since each column consist of a different business logic, so it is not ideal to have one slicer that filters all of them, unless you can specify what type of date you are filtering on . ( thus you need to unpivot your table ) 

 

 

hope this makes sense. 

 

 

If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠

 

 

 

 

 

 

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.