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
dsolo1138
Regular Visitor

Comparing values based on separate date slicers.

I am having an issue comparing a BASELINE value to each occurance of the TARGET values. I can get the "most recent baseline value" out of the range of dates I have selected. The problem is the TARGET values. I need to compare the BASELINE value to EACH TARGET instance. I have provided a link to a pbix file with sample data displaying the issue. Date slicers are set up top. Left table shows the correct BASELINE values, but the "Total Cost' column is summing the values. In the right table, the "Total Cost" is not summing as I added the "rn" column to separate each instance of the TARGET costs, but is diplaying BASELINE values based on each occurance of the TARGET values. What I need, is the ability to compare the "Most Recent Baseline Value" to each instance of the TARGET values (no sum). Any help on this would be greatly appreciated. This one is a bit out of my scope of knowlegde.

 

Thank you for any help that can be suggested.

 

https://www.dropbox.com/s/oq0gmxxkwphgnrg/Sample.pbix?dl=0

1 REPLY 1
v-yueyunzh-msft
Community Support
Community Support

Hi , @dsolo1138 

According to your .pbix file , do you mean you want to get the same "Total cost" in the right table?

If this , you can try this dax :

Total Cost = 
CALCULATE( SUMX(VCS,VCS[VendorCost100_weightedavg]) , ALL('VCS'[rn]))

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

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.