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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
d_brew
Frequent Visitor

Measure to Group by Year and Month without Date Table

Groupby Sample.PNG

 

In the sample above, I'm trying to get the last two columns(have manually entered data for us to reference). I need to get the SUM of Status Total Grouped By Month and Year (regardless of status) for each person. So for Bob it would be 5 Good, 3 Bad, and 2 Redirect for 1/2018. I then need to get the Good + Redirect/ Total %. I'm having trouble getting the first part though. 

 

 

Using this Measure in a table, I'm not getting the result I would expect. In this context, how would I get the SUM of StatusCount, Grouped by CallMonth and Call Year (i.e. the Measure should be equal to the values in the Status Total by Month and Year column pictured above).

 

 

Grouby By 2.PNG

 

Measure = CALCULATE(SUM(WebSample[StatusCount]), WebSample[CallMonth], WebSample[CallYear])
1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

@d_brew

 

Hi, lets try with:

 

Status Count - Measure =
SUM ( Table1[Status Count] )
Status Total by Month & Year =
CALCULATE ( [Status Count - Measure]; ALL ( Table1[Status] ) )
Status Count Good and Redirect  =
CALCULATE ( [Status Count - Measure]; Table1[Status] IN { "Good"; "Redirect" } )
Status %  Good and Redirect =
DIVIDE ( [Status Count Good and Redirect]; [Status Total by Month & Year] )

Img2.png

Let me lnow if works in your scenario

 

Regards

 

Victor

Lima - Peru




Lima - Peru

View solution in original post

1 REPLY 1
Vvelarde
Community Champion
Community Champion

@d_brew

 

Hi, lets try with:

 

Status Count - Measure =
SUM ( Table1[Status Count] )
Status Total by Month & Year =
CALCULATE ( [Status Count - Measure]; ALL ( Table1[Status] ) )
Status Count Good and Redirect  =
CALCULATE ( [Status Count - Measure]; Table1[Status] IN { "Good"; "Redirect" } )
Status %  Good and Redirect =
DIVIDE ( [Status Count Good and Redirect]; [Status Total by Month & Year] )

Img2.png

Let me lnow if works in your scenario

 

Regards

 

Victor

Lima - Peru




Lima - Peru

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.