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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
nicholastrausch
Frequent Visitor

Help with Measure to Subtotal by Date in an Unpivoted Table

Feeling like a noob this morning... for some reason I just can't seem to get this to come out right.  Hoping somebody can get me back on track.  

 

Straight forward table with a [Date], [Type] and [Count].  I need to sum the [Count] of all [Types] by [Date].  I've been messing with Calculate / SUMX variations.. but just can't get the right output.  Measure 1 created below in the xlsx needs to act as the denominator so that Measure 2 can be [Count] / [Measure 1].  Appreciate any help!

 

power bi.PNG 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@nicholastrausch 
Please create these two measures

TotalCountByDate = CALCULATE(SUM('Table'[Count]),ALLEXCEPT('Table','Table'[Date]))
Measure2 = 
VAR _count = SUM('Table'[Count])
RETURN DIVIDE(_count,[TotalCountByDate],0)

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@nicholastrausch 
Please create these two measures

TotalCountByDate = CALCULATE(SUM('Table'[Count]),ALLEXCEPT('Table','Table'[Date]))
Measure2 = 
VAR _count = SUM('Table'[Count])
RETURN DIVIDE(_count,[TotalCountByDate],0)

 

Thanks @Anonymous ! This did solve my problem.  I had simplified my table example down and had left out a few columns, but once I also added those the ALLEXCEPT function I am good.  Appreciate the help.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.