Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello to all,
Can I use this formula:
Solved! Go to Solution.
Hi @Anonymous ,
I created some data:
Here are the steps you can follow:
1. Create calculated column.
Period number = VALUE(RIGHT([Period],2))
2. Create measure.
Measure =
var _OK=COUNTX(FILTER(ALL('Table'),[Year]=2021&&[CONFORMITY]="OK"&&[Period number]<=13),[CONFORMITY])
var _total=cOUNTX(FILTER(ALL('Table'),[Year]=2021&&[Period number]<=13),[CONFORMITY])
return
DIVIDE(_OK,_total)
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
I created some data:
Here are the steps you can follow:
1. Create calculated column.
Period number = VALUE(RIGHT([Period],2))
2. Create measure.
Measure =
var _OK=COUNTX(FILTER(ALL('Table'),[Year]=2021&&[CONFORMITY]="OK"&&[Period number]<=13),[CONFORMITY])
var _total=cOUNTX(FILTER(ALL('Table'),[Year]=2021&&[Period number]<=13),[CONFORMITY])
return
DIVIDE(_OK,_total)
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous
Can you share some sample data with the desired output to have a clear understanding of your question? Mention whether you want a calculated column or measure
You can save your files in OneDrive, Google Drive, or any other cloud sharing platforms and share the link here.
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hello
Here is an example of data:
Year | CONFORMITY | Period | Factories |
2020 | OK | P13 | RCA |
2020 | OK | P13 | RCA |
2020 | OK | P13 | RCA |
2021 | OK | P01 | RFT |
2021 | WRNG_NOK | P01 | RFT |
2021 | OK | P02 | RNI |
2021 | OK | P02 | RNI |
2021 | OK | P02 | RNI |
2021 | OK | P02 | RNI |
2021 | OK | P02 | RNI |
Outcome is % of OK product vs the total (OK/NON OK or Warning) over the last 13 periods.
Hope it helps,
Hervé
User | Count |
---|---|
130 | |
108 | |
101 | |
67 | |
62 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |