The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Dear,
I need to create the following table in the report.
It is supposed to count all "out" values from each number and count "in" values (from the end each number) until the first "out" is encountered. What should such functions look like?
I am attaching sreen of pbix file.
Thank you in advance for your help.
Solved! Go to Solution.
Here is the steps:
1. Add an Index column in Query Editor,
2. Add a Rank column
Countout = CALCULATE(COUNT('Table'[result]),FILTER('Table',[result]="out"))+0
countintoout = IF([Countout]=0,COUNT('Table'[result]),CALCULATE(MIN('Table'[Rank]),FILTER('Table',[result]="out"))-1)
Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Basically you need to add an index and a rank column to identify the position of the "out" value. Then create a measure to find the place of the "out" value.
Please check the pbix for detail:
Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I'm having trouble opening a file from you. Can you insert a file that is not on OneDrive or screenshots of the table and measures.
Here is the steps:
1. Add an Index column in Query Editor,
2. Add a Rank column
Countout = CALCULATE(COUNT('Table'[result]),FILTER('Table',[result]="out"))+0
countintoout = IF([Countout]=0,COUNT('Table'[result]),CALCULATE(MIN('Table'[Rank]),FILTER('Table',[result]="out"))-1)
Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
What measures will look like when empty values appear. The appear at the end of the test numbers.
The end result should be as you have obtained.
I guess you could still try the same formulas, because blank is also considered as a row value in power bi and the formula only looks for the "out “value, so ”in“ and ”blanks“ does not really matter.
Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
26 | |
15 | |
14 | |
12 |
User | Count |
---|---|
110 | |
40 | |
25 | |
24 | |
19 |