cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dmyers1000
Regular Visitor

Count of a Measure

Hello Everyone,

 

I am new to Power Bi, I created a measure that counts IDs per sales rep, however, what I am looking for is a secondary measure that will count the cels per day of that table that are less than 3 however it does not seem to count the zeros.

Any help would be appreciated!

 

Measure: 

CALCULATE(
DISTINCTCOUNT(vbpm_opportunity[Id]))+0

 

 

Table

dmyers1000_0-1612807732635.png

 

The result I am trying to achieve is to count all red cels which are less than 3

 
 
2/2/20212/3/20212/4/20212/5/20212/6/20212/7/20212/8/2021
2113313
 
1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@dmyers1000 I missed pbix file, here it is :

 

CountX = SUMX ( SUMMARIZE( ALLSELECTED ( data[OwnerId] ), data[OwnerId],  "@Count", IF ( [CountID] < 3, 1, 0 ) ), [@Count] )

 

Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





View solution in original post

9 REPLIES 9
parry2k
Super User
Super User

@dmyers1000 sorry for the delay, I missed the attachment to get back on it. Cheers!






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





parry2k
Super User
Super User

@dmyers1000 I missed pbix file, here it is :

 

CountX = SUMX ( SUMMARIZE( ALLSELECTED ( data[OwnerId] ), data[OwnerId],  "@Count", IF ( [CountID] < 3, 1, 0 ) ), [@Count] )

 

Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





@parry2k This solution works great!! thank you so much!

v-xulin-mstf
Community Support
Community Support

Hi @dmyers1000,

 

Try measure as:

Measure = 
CALCULATE(
    DISTINCTCOUNT(vbpm_opportunity[Id]),
    FILTER(
        Table,
        Table[cels]<3 && Table[cels]>0 && Table[Date]=MAX(Table[Date])
        )))

 

Best Regards,

Link

Hi @v-xulin-mstf,

 

Thanks! however it does not seem to give me results, let me know if I am interpreting this wrong.

 

dmyers1000_0-1612976398928.png

 

parry2k
Super User
Super User

@dmyers1000 It will be easier if you share pbix file using one drive/google drive with the expected output. Remove any sensitive information before sharing.






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Sure thing, below the link for pbix file, in the visual you will see an 2 tables, the table below (image) is the expected result which is counting the red cels from the table above. The issue is that I am not able to count zeros which are blanks.

 

PBIX FILE 

parry2k
Super User
Super User

@dmyers1000 try this

 

Count Less Than 3 = 
COUNTX ( VALUES ( Table[Date column] ), IF ( [Your Measure] < 3, 1 ) )

 

Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Thanks however does not seem to solve the issue any other ideas?

 

dmyers1000_0-1612811313158.png

 

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