cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tommyvhod
Helper II
Helper II

number of ids on work stations

Hi all.

 

I would like to count the number of IDs on each working stations. 1 ID goes trough all working stations and I would like to see the actual status of the product. E.g:

Work st.ID 
11101 
21101 
31101 
41101 
51101 
61101 
71101*
11102 
21102 
31102*
11103 
21103 
31103 
41103 
51103 
61103 
71103 
81103*
11104 
21104*
11105*

 

All IDs got trough work station 1. But only 1103 got trough work station 8 ( last work stations marked with star)

 

I would like count the number of IDs on each work station but only the highest work station. So I would like to see the number of stars ( number of IDs on last work stations)

 

I was only able to count all IDs on each work stations ( so 5 IDs on 1 ,4 IDs on 2 , 3IDs on 3 and so on)

My goal is to show that work station 1 - 1ID, 2-1ID, 3-1ID,4-0ID,5-0ID,6-0ID,7-1ID,8-1ID

 

Thank You

1 ACCEPTED SOLUTION

Try ALLEXCEPT to preserve your filters perhaps.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

5 REPLIES 5
Greg_Deckler
Super User
Super User

God help me, I think I understand this... 🙂

 

 

Measure 2 = 
    VAR __WorkSt = MAX([Work st.])
    VAR __table = SUMMARIZE(ALL('Table5'),[ID],"__Max",MaX([Work st.]))
    VAR __count = COUNTROWS(FILTER(__table,[__Max] = __WorkSt))
RETURN
    IF( ISBLANK(__count), 0 , __count)

 

 

See attached, Page 3, Table5


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Thank you for the quick reply. Yes in the table you created seems to work. I added to my table and it shows wrong number. Probably becouse I have slicers mon " Table5" and with ALL it removes the filters. ( i have a slicer for product name and status, with that I am unable to filter out the finished parts and see only the WIP)

Try ALLEXCEPT to preserve your filters perhaps.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

I added ALLEXCEPT; but here I should add all the columns which are filtered on my dashboard? Becouse I tried that and now I should have 19pcs in WIP and this shows 813 🤔🙂

I tried ALLSELECTED with this it removes the filter from the formula but keeps the slicers on the Page.

 

Finally.... it works.... thank You very much

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors
Top Kudoed Authors