cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Peleias
Helper I
Helper I

Count Results from a Measure

Hi Guys.
Looking and looking I only saw complicated formulas of what I need and I couldn't reproduce.
I think it's simple. (for the experts)

I have a column with results from a measure. (with disposable zeros)

Planned
Planned

 0

Finished

Started

 

I wish I had a word count to use in a visual. (like Pie)

Finished1
Planned2
Started1

 

I thank the community for the help, every answer I get here helps me in at least 10 different things.

Thanks!

1 ACCEPTED SOLUTION

Hi @Peleias ,

 

You need to create a separate table that contains all the status values. 

 

vkkfmsft_0-1653382371325.png

 

Then use the measure.

 

Count_ = 
COUNTROWS (
    FILTER (
        VALUES ( 'Table'[Column] ),
        [Result from a Measure] = MAX ( 'Status'[Value] )
    )
)

vkkfmsft_1-1653382393078.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
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
amitchandak
Super User
Super User

@Peleias , if the measure is returning those values. Then you need to have a table with those values and then you use that in another measure using a group from the original table

 

Very similar to what I have done here

Dynamic segmentation -Measure to Dimension conversion: https://youtu.be/gzY40NWJpWQ



New Power BI Features
Datamarts: https://youtu.be/8tskWsJTEpg
Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin !! Proud to be a Super User!
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
!! Subscribe to my youtube Channel !!

Thank you @amitchandak 


I saw your video and I didn't understand it very well.
I searched here in the forum for several posts and most ask for a filter or a complex formula to have the result of the count based on a measure.

So I asked for help here in the simplest version of this Dax of Counting words resulting from a measure... in order to understand how it works and understand more complex formulas with filters and variables of the result of a measure.

 

ColumnResult from a Measure
FloorPlanned
RoofPlanned
Pilar Period 0
PilarFinished
wallStarted

 

Expect Result

StatusCount
Started1
Planned2
Finished1

 

Thanks

Hi @Peleias ,

 

You need to create a separate table that contains all the status values. 

 

vkkfmsft_0-1653382371325.png

 

Then use the measure.

 

Count_ = 
COUNTROWS (
    FILTER (
        VALUES ( 'Table'[Column] ),
        [Result from a Measure] = MAX ( 'Status'[Value] )
    )
)

vkkfmsft_1-1653382393078.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

@v-kkf-msft Thank you!
Perfect answer!
I had reached another conclusion but without being able to connect with the table. However I asked another question, I'll put that you answered the 2.

 

Helpful resources

Announcements
June 2022 update 768X460.jpg

Check it out!

Click here to read more about the June 2022 updates!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors
Top Kudoed Authors