Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hello all
I have a formula
hi @Tommyvhod
try like:
produced Qty =
CALCULATE(
DISTINCTCOUNT(Data[ID]) ,
KEEPFILTERS(Data[step] = 1 || Data[step] = 2)
)
o
Unfortunately not working. Maybe because the distinctcount is counting ID and we are filtering the process step?
hi @Tommyvhod
what about this:
produced Qty =
VAR _step = SELECTEDVALUE(data[step])
VAR _value1 =
CALCULATE(
DISTINCTCOUNT(Data[ID]) ,
Data[step] = 1 || Data[step] = 2
)
VAR _value2 =
CALCULATE(
DISTINCTCOUNT(Data[ID]) ,
Data[step] =4
)
RETURN
IF( _step = 4, _value2, _value1)
If I understood correcly if the process is 4 than the number of parts there will be calculated.
The problem here is that always process 1 and 2 is used for the quantities.
It looks like: step 1 and 2 is the production, next steps are other steps like painting, control, packaging ( more than 20 steps) and for defects I would like to return the produced qty. ( step 1+2)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
22 | |
17 | |
17 | |
11 | |
7 |
User | Count |
---|---|
27 | |
26 | |
13 | |
12 | |
12 |