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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Austin_Fisher
New Member

Counting values in a MEASURE

Hi!

I am currently learning Power BI and I have taken a stumble... 

I have a field that I created through a measure - so it is not a part of a table since I calculated it from my original table (just to clarify). However I am trying to take the data one step further and "measure the measure" essentially. 

My original measures name is "RFI's Completed Ontime" and within that measure I have 3 catagories - "On-Time", "Late" & "Unresolved". 

However, now I am trying to quantify/count how many times each of these words occures in that measure so that I can put them in a pie chart. 

Keep in mind, I am essentially attempting to take a MEASURE OF A MEASURE

 Capture.PNG

Above is a screen shot of the measure I am attempted to measure. I know it looks like its in a table, but it is just a measure being displayed in one of the views.

 

 

****TO ADD CONTEXT*******

Here is the DAX I used to created the first measure, if it is not possible to take a measure of a measure, then maybe it would be possible to tweek the first measure to get the desired outcome as explained about? SEE BELOW

 

RFI's Completed Ontime =
VAR NumDays = [RFI's Days Under or Overdue]
VAR Result =
SWITCH(
    TRUE(),
    ISBLANK(NumDays),"Unresolved",
    NumDays <1, "On-Time",
    NumDays >=-1, "Late")
    RETURN Result
3 REPLIES 3
v-yueyunzh-msft
Community Support
Community Support

Hi , @Austin_Fisher 

According to your descritpion, you want to count the measure value with three options.

Here are the steps you can refer to :

(1)This is my test data:

vyueyunzhmsft_0-1693798171189.png

(2)We can create a table using "Enter Data":  The table name is 'Table 2'

vyueyunzhmsft_1-1693798195850.png

We do not need to create any relationship between tables.

 

(3)Then we can create a measure :

Count Measure = var _t = SUMMARIZE('Table' ,'Table'[Master] ,'Table'[Customer], "RFI Measure" , [RFI's Completed Ontime])
var _cur_master = MAX('Table'[Master])
var _cur_type= MAX('Table 2'[Column1])
return
 COUNTROWS(FILTER(_t , [RFI Measure] = _cur_type))


Then we can put this measure and field on the visual and we can get the result as follows:

vyueyunzhmsft_2-1693798374603.png

 

 

 

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

Ashish_Mathur
Super User
Super User

Hi,

Share the download link of the PBI file.


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

@Austin_Fisher , You need to use dynamic segmentation

refer

Power BI ABC Analysis using Window function, Dynamic Segmentation: https://youtu.be/A8mQND2xSR4

Customer Retention with Dynamic Segmentation, New/Lost/Retain Customer Count: https://youtu.be/EyL7KMw877Q

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

October NL Carousel

Fabric Community Update - October 2024

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