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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
yanisyes
Frequent Visitor

Power Bi filter a column with dates not number

Hi everyone,

 

I have some difficulties.

I have  the table below with dates.

Activity NameBASELINE Forecast
activity 1B5202/09/2018
activity 2B5222/08/2019
activity 1B5303/09/2018
activity 2B5323/08/2019
activity 3B5229/11/2018
activity 3B5330/11/2018

 

I want to obtain this table 

yanisyes_0-1649157501165.png

My goal is to compare the two baseline that I have chosen in my slicers  and at the end to do a delta beetwen the two dates for the same activity.

As a result I want to have two different forecast column  with one slicer to filter the baseline 1 and another slicer to chose the baseline I want to compare with. 

It would have been more simple if I wanted to manipulate two different decimal number columns. I would have use calculate(sum(forecast),Baseline="CM53") but since I manipulate  dates column I don't know how to do.

 

Thanks in advance for you help.

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @yanisyes ,

 

The result is as follows.

vstephenmsft_0-1649753100028.png

 

 

Here's my solution.

1.Using dax to create two calculated table.

Table 2 = DISTINCT('Table'[BASELINE])
Table 3 = DISTINCT('Table'[BASELINE])

Rename one of BASELINE columns as BASELINE 1, there's no relationship among three tables.

vstephenmsft_1-1649753231205.png

 

2.Create two measures.

Forecast selected baseline = CALCULATE(MAX('Table'[Forecast]),FILTER('Table',[BASELINE] in ALLSELECTED('Table 2'[BASELINE])))
Forecast selected baseline 1 = CALCULATE(MAX('Table'[Forecast]),FILTER('Table',[BASELINE] in ALLSELECTED('Table 3'[BASELINE 1])))

vstephenmsft_2-1649753280561.png

 

You can check more details from my attachment.

 

 

Best Regards,

Stephen Tao

 

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

 

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @yanisyes ,

 

The result is as follows.

vstephenmsft_0-1649753100028.png

 

 

Here's my solution.

1.Using dax to create two calculated table.

Table 2 = DISTINCT('Table'[BASELINE])
Table 3 = DISTINCT('Table'[BASELINE])

Rename one of BASELINE columns as BASELINE 1, there's no relationship among three tables.

vstephenmsft_1-1649753231205.png

 

2.Create two measures.

Forecast selected baseline = CALCULATE(MAX('Table'[Forecast]),FILTER('Table',[BASELINE] in ALLSELECTED('Table 2'[BASELINE])))
Forecast selected baseline 1 = CALCULATE(MAX('Table'[Forecast]),FILTER('Table',[BASELINE] in ALLSELECTED('Table 3'[BASELINE 1])))

vstephenmsft_2-1649753280561.png

 

You can check more details from my attachment.

 

 

Best Regards,

Stephen Tao

 

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

 

 

amitchandak
Super User
Super User

@yanisyes , First on you need use an independent slicer, based on that you need get two two meausres and then take diff

 

very similar to what I have done here

Compare Categorical Data Using Slicers - Compare two Brands: https://youtu.be/exN4nTewgbc

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi Amitchandak,

First thanks for your answer but my problem here is that my columns are dates not numbers so I can't use the calculate function like in your video

 

Best regards,

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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