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.
I need to count the months that contain values to calculate the average spending.
The attached photo shows the months that contain values.
The target is to get the average spending like this (114,225 / 7 = 16,318).
Please help me to solve this issue>
Thank you in advance.
Solved! Go to Solution.
Hi @aamulhim
Try these:
with a separate dates table
=
CALCULATE (
DISTINCTCOUNT ( dates[month] ),
FILTER ( 'table', NOT ( ISBLANK ( 'table'[value] ) ) )
)
no dates table
=
CALCULATE (
DISTINCTCOUNT ( 'dates'[month] ),
FILTER ( 'table', NOT ( ISBLANK ( 'table'[value] ) ) )
)
if none works, please share a sample data (not an image) and your expected result.
Proud to be a Super User!
Hi @aamulhim
Try these:
with a separate dates table
=
CALCULATE (
DISTINCTCOUNT ( dates[month] ),
FILTER ( 'table', NOT ( ISBLANK ( 'table'[value] ) ) )
)
no dates table
=
CALCULATE (
DISTINCTCOUNT ( 'dates'[month] ),
FILTER ( 'table', NOT ( ISBLANK ( 'table'[value] ) ) )
)
if none works, please share a sample data (not an image) and your expected result.
Proud to be a Super User!
Thank you so much Dane. It works.
Best regards,
Hi,
It will depend up on the ganularity of your data. Share the download link of the PBI file.
Hi
Thank you for your reply. I have attached a screenshot from the data view, I hope that will help.
Hi,
An image does not help. Please share the download link of the PBI file.
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 |
---|---|
104 | |
101 | |
79 | |
72 | |
64 |
User | Count |
---|---|
142 | |
108 | |
101 | |
81 | |
74 |