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.
So I want to create a measure where I count the number of days in my linechart. So in the example below, you can see there is 29 dates so I want a measure that just contains the number 29, based on the count of the x-axis.
Hi @Anonymous ,
I am not clear about your requirement, if possible could you please inform me more detailed information(such as your expected output and your sample data)? Then I will help you more correctly.
Please do mask sensitive data before uploading.
Thanks for your understanding and support.
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous
You can count the date when the measure is not bank or 0. the measure is the meausre of line and date is the date field
Calculate(count(Date[Date]),filter(table,[Measure]>0)
Or
Calculate(count(Date[Date]),filter(table,not(isblank([Measure])))
More than one measure
Calculate(count(Date[Date]),filter(table,not(isblank([Measure])) || not(isblank([Measure2])))
Hi,
This is a little hard with this information provided but i believe that you want something along the lines of:
Measure =
Countrows(
Summarize(
'Calendar';
Calendar[Date];
"Sum" ; [Your measure]
)
)
Let me know if it's correct or not 🙂
Br,
J
I will try explaining it a bit more, but might make it more difficult, but I certainly do not hope so. So I am comparing this line chart to another line chart, I select a date in the first chart and it plots, 29 days, 27 days, or an amount of dates (wherever data is available). So if the first line chart contains 29 days of data then my measure looks like this:
What value are you getting if you use:
Measure =
Countrows(
Summarize(
ALLSELECTED('Calendar');
Calendar[Date];
"Sum" ; [Your measure]
)
)
It's hard to propose something because it's clear that there are row context related to the measure you want to create. It would be very helpful to se the other data that is present in the matrix where you want this measure.
Br,
J
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 |
---|---|
107 | |
98 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |