Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
dax measure for getting total cost from fact table by comparing the dates columns from two diffrent dimension tables.
i have a fact table with two date ID fields and a cost column.
Please correct the sample data as per your description. US locale uses forward slash / , not backslash \
If your users provide end dates before start dates then you need to aask them for better data.
Actually its forward slash.It was a Typing mistake
Hi @Sreeragkv07,
I think these operations should similar to common calculations, you need to lookup correspond date values based on keys and use them with datediff function to get the diff and calculate with cost field get total spends.
BTW, it seems like the source data is not correct, I suppose you need to do some data cleanup and transform to convert them to normal date values before calculate.
Regards,
Xiaoxin Sheng
Hi Ibendlin,
- Actually the userdata is given same as mentioned.
- end date key is in whole number and the start date and end date in Date format.
- US Locale
Please correct your sample data
- some end dates are before the start dates
- end date key is numeric or alpha?
- which locale is this date format from?
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!