Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

How to calculate the measure only within one month?

Faced such a problem. There is a format table Key (unique) - Date - Doctor - Area

There is a measure that is calculated by the formula: Proc from total = count ('Reel status' [Key]) / CALCULATE (COUNT ('Reel status' [Key]), filter (all ('Reel status'), [Doctor] = "Doctor"))

I drop this measure to the visualization and add Area to the filters. As a result, I get the number of lines in which the Area corresponds to the one I need as a percentage of the total number of lines with Doctor in the "Doctor" field. And it works. I display information for the year and total rows with the Doctor status, I have 65K, and for a specific area - 28K. About 42% Will do.

But now I go down to the level below and see not completely correct statistics. The sum of all the columns is still 42%, but now they are smeared by months.

If I understood correctly, then in my measure the numerator is counted for a month, and the denominator is still common. How to explain the measure that if statistics are displayed for a month, then both count ('Reel status' [Key]) and denominator CALCULATE (COUNT ('Reel status' [Key]), filter (all ('Reel status'), [Doctor ] = "Doctor")) should be counted only for a month?

2021-08-16 15_02_32-Moscow CF - Rework - Power BI Desktop.png

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

I think you could create other measure .

Proc from month = COUNT(data[Key]) / CALCULATE (COUNT ([Key]), filter (ALL(data), MONTH([Spliced At])=MONTH(MAX([Spliced At]))&&[Doctor] = "Doctor"))

The final output is shown below:

vyalanwumsft_0-1629261352030.png

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

I think you could create other measure .

Proc from month = COUNT(data[Key]) / CALCULATE (COUNT ([Key]), filter (ALL(data), MONTH([Spliced At])=MONTH(MAX([Spliced At]))&&[Doctor] = "Doctor"))

The final output is shown below:

vyalanwumsft_0-1629261352030.png

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , do have data for more than a year?

Demonimator is everything across all year for [Doctor] = "Doctor"

 

And numerator is based on axis

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Anonymous
Not applicable

https://docs.google.com/spreadsheets/d/18U1B0DcZm9eJ_gOjMzVSsNNTOc1gsZSS/edit?usp=sharing&ouid=11836... 

Correctly it turned out to unload information in only a couple of months. Hope this will be enough.

Anonymous
Not applicable

No, now I have information only from the beginning of this year, but in the future I want to increase this range.
I will now try to make an upload without personal information.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.