The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi everyone,
I have some difficulties.
I have the table below with dates.
Activity Name | BASELINE | Forecast |
activity 1 | B52 | 02/09/2018 |
activity 2 | B52 | 22/08/2019 |
activity 1 | B53 | 03/09/2018 |
activity 2 | B53 | 23/08/2019 |
activity 3 | B52 | 29/11/2018 |
activity 3 | B53 | 30/11/2018 |
I want to obtain this table
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.
Solved! Go to Solution.
Hi @yanisyes ,
The result is as follows.
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.
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])))
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.
Hi @yanisyes ,
The result is as follows.
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.
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])))
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.
@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
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,
User | Count |
---|---|
65 | |
60 | |
55 | |
54 | |
31 |
User | Count |
---|---|
180 | |
88 | |
70 | |
46 | |
46 |