The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
I have created the following measure, which I then implemented in a line graph. However, the measuer is only showing the total sum for every month, and not the real sum/month.
Any ideas on how to fix this?
Count Forms Category Test 2023 =
CALCULATE(COUNT('lead'[Forms category]),
ALL(),
'lead'[Country]="Test Form",
'lead'[Forms category]="Test Category",
DATESBETWEEN(Datum[Date],DATE(2023,1,1),DATE(2023,8,31)
))
When I'm not using "time" in my measure but a slicer, it's working fine (but I want to it work without date slicer).
The actual goal is to display two graphs, one for 2023 and one for 2024 in the same 12 months chart.
Thanks for your help!
Solved! Go to Solution.
Hi @cn4422
Try using VALUES(Datum[Date]. [Month]) in your measure to ensure that the data is summarized by month.
Count Forms Category Test 2023 by Month =
CALCULATE(
COUNT('lead'[Forms category]),
'lead'[Country] = "Test Form",
'lead'[Forms category] = "Test Category",
DATESBETWEEN(Datum[Date], DATE(2023, 1, 1), DATE(2023, 12, 31)),
VALUES(Datum[Date].[Month])
)
Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @cn4422
Try using VALUES(Datum[Date]. [Month]) in your measure to ensure that the data is summarized by month.
Count Forms Category Test 2023 by Month =
CALCULATE(
COUNT('lead'[Forms category]),
'lead'[Country] = "Test Form",
'lead'[Forms category] = "Test Category",
DATESBETWEEN(Datum[Date], DATE(2023, 1, 1), DATE(2023, 12, 31)),
VALUES(Datum[Date].[Month])
)
Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you very much, that did the trick! 🤗
One more question, if I may:
With your help I've created this measure for 2024:
Hi @cn4422
The problem you are experiencing is due to the use of the ALL('Datum') function, which ignores all filters in the Datum table. Refer to link: ALL function (DAX) - DAX | Microsoft Learn.
Drop ALL(Datum) and try the following DAX:
Count Forms Category DE 2023 SPLY TEst 2 plus date slicer =
CALCULATE(
COUNT('lead'[Forms category]),
'lead'[Country] = "Test Form",
'lead'[Forms category] = "Test Category",
SAMEPERIODLASTYEAR(Datum[Date])
)
Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ah, sure... 🙈
Thank you so much, it's working fine! 👍
Kind regards,
Michael
User | Count |
---|---|
24 | |
10 | |
8 | |
6 | |
5 |
User | Count |
---|---|
31 | |
11 | |
10 | |
10 | |
9 |