Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
2 | |
2 | |
1 | |
1 |