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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
dpmsvendor
Microsoft Employee
Microsoft Employee

Measure to create totals by grouping within table

Hi, I need to create a measure that I will use to divide in another measure. The trick is to group one of the measures by quarter.

 

Here is how the data is set up. The start date has a relationship to a calendar table which has the quarter column:

Respondent IDStart DateAttribute.1Value
a1236/1/2022color redyes
a1246/2/2022color redmaybe yes
a1256/3/2022color redneither yes or no
a1266/4/2022color redmaybe no
a1276/5/2022color redno
a1286/6/2022color blueyes
a1296/7/2022color bluemaybe yes
a1306/8/2022color blueneither yes or no
a1316/9/2022color bluemaybe no
a1326/10/2022color blueno

 

Here is what I'm trying to accomplish. The left table is what I have now, and the right table shows what I need:

dpmsvendor_0-1657753097912.png

Count Respondent ID, All and % are all measures.

  • Count Respondent ID = CALCULATE(COUNT('table'[Respondent ID]))
  • All = CALCULATE(COUNT('table'[Respondent ID]),ALLSELECTED('table'[Value]))
  • % = DIVIDE('table'[Count Respondent ID], 'table'[All])

Would appreciate any help and advice. Thanks!

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thanks Ashish! Worked perfectly

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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