The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
58 | |
32 | |
20 | |
16 | |
15 |
User | Count |
---|---|
79 | |
32 | |
30 | |
24 | |
21 |