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.
Hi guys,
I want to write dax query that shows sales on weekdays. But grand total and yearly total are not true. Could you help me for solving this problem?
Best regards.
Hi,
I couldnt solve it yet 😕
Hi, @AlfredoBIS
Has the problem been solved so far?
If you still need help, please share a sample file for further research.
Best Regards,
Community Support Team _ Eason
You can send a picture of your relationship just like I am sending:
You can send a picture of your relationship just like I am sending:
You can share a picture of your relationships.
Based on them I believe we can find a solution.
See if it helps you
Assuming that your date dimension table is correctly related to your fact table.
And in your dates dimension table you have a column that identifies whether the day is useful or not.
I suggest the steps and measures below:
WorkDays =
CALCULATE(
COUNT('📅dCalendar'[Work Day Value]),
'📅dCalendar'[Work Day Value] = 1)
SalesPerWorkingDay =
DIVIDE([Sales Amount] , [WorkDays])
Thank you so much.
Now
Hi,
Thank you so much for your answer. I used calculate but doesnt change result
Better to have year and month columns.then you can iterate over SUMMARIZE ( DimDate, DimDate[Year], DimDate[Month] ). It should work.
Hi I tried this: but couldnt solve yearly and grand total problem.
I don't understand why you are using SUMX.
your goal is not to know how many working days?
That's why I suggested using COUNT.
You just have a column in your date dimension table that identifies the date as useful or not.
Hi @rodrigosan,
I tried for calculating workdays like this. But result doesnt change. I want to correct grand total sales and yearly total sales.
You can share a picture of your relationships.
Based on them I believe we can find a solution.
Sure,
DimDate Table
FactSatles table
relationship:
Transform date/time columns to date
Date must be related only to date
ı changed datakey format to date.
But result didnt change . Year 2017i2018,2019 and grand total is not true
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 |
---|---|
46 | |
27 | |
21 | |
12 | |
8 |
User | Count |
---|---|
74 | |
52 | |
45 | |
15 | |
12 |