Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
My intention is to produce the total sales of each day in each row. But here I'm only getting the values of the respective rows in the column. What is the issue with the above code
Solved! Go to Solution.
Hello @Cyriackpazhe
I don't think you need MAX() function, i.e., you can just use the following:
VAR Maxxx = Sales[Order Date]
Also in the FILTER(), use the entire table instead and not just the Sales[Order Date] column and no need to use ALL() function.
Could you please try doing this small change and see if you are getting the desired results or, not.
Here is one of the example DAX:
Col =
VAR Maxxx = financials[Date]
VAR Total = CALCULATE(
SUM(financials[ Sales]),
FILTER(
financials,
financials[Date] = Maxxx
)
)
RETURN
Total
I am also attaching a sample report for your reference.
Best Regards,
Udit
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudo 👍
🚀 Let's Connect: LinkedIn || YouTube || Medium || GitHub
✨ Visit My Linktree: LinkTree
Proud to be a SuperUser
I'm questioning the sales figure of 3578.28 for that date. Since that's the only sale listed, could you double-check by filtering the Order Date?
If possible, sharing a PBIX file with anonymized data would be very helpful.
My concern stems from how the FILTER()
function works. It creates a virtual table. Using just the Order Date column doesn't inherently link to sales.
We need to create that filtered virtual table and then sum the sales within it. That's why the claim of 3578.28 being the only sale on that date seemed potentially inaccurate.
Thanks,
Udit
Hello @Cyriackpazhe
I don't think you need MAX() function, i.e., you can just use the following:
VAR Maxxx = Sales[Order Date]
Also in the FILTER(), use the entire table instead and not just the Sales[Order Date] column and no need to use ALL() function.
Could you please try doing this small change and see if you are getting the desired results or, not.
Here is one of the example DAX:
Col =
VAR Maxxx = financials[Date]
VAR Total = CALCULATE(
SUM(financials[ Sales]),
FILTER(
financials,
financials[Date] = Maxxx
)
)
RETURN
Total
I am also attaching a sample report for your reference.
Best Regards,
Udit
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudo 👍
🚀 Let's Connect: LinkedIn || YouTube || Medium || GitHub
✨ Visit My Linktree: LinkTree
Proud to be a SuperUser
As you can see, the result is incorrect. In the first row the the value should have been 3578.28 because that is the only sales on that particular date.
Also Why couldn't i use a column filter instead of table filter before.
I'm questioning the sales figure of 3578.28 for that date. Since that's the only sale listed, could you double-check by filtering the Order Date?
If possible, sharing a PBIX file with anonymized data would be very helpful.
My concern stems from how the FILTER()
function works. It creates a virtual table. Using just the Order Date column doesn't inherently link to sales.
We need to create that filtered virtual table and then sum the sales within it. That's why the claim of 3578.28 being the only sale on that date seemed potentially inaccurate.
Thanks,
Udit
Yes, what you said was right. That was not the only sales on that day. Thank you
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
26 | |
12 | |
11 | |
9 | |
9 |
User | Count |
---|---|
17 | |
14 | |
13 | |
13 | |
12 |