Forum Discussion
Create Visual on frontend measures
Hi Anonymous - Can please share some sample data for more analysis, it helps to understand
as per my understanding , you can create a measure that uses a SWITCH statement to dynamically count Pass and Fail based on a selected value
DynamicCount =
SWITCH (
SELECTEDVALUE('PassFailTable'[PassFail]),
"Pass", CALCULATE(COUNTROWS('YourTable'), 'YourTable'[PassFailMeasure] = "Pass"),
"Fail", CALCULATE(COUNTROWS('YourTable'), 'YourTable'[PassFailMeasure] = "Fail"),
BLANK()
)
Hope it works and helps
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
- Anonymous2 years agoNot applicable
Here is data in WorkUnit Table and PF is measure created on frontend based on logic.
Work Units Class Code PF 2P006 110 Pass 2A010 114 Fail 2A011 105 Fail 2J012 109 Pass 2A013 105 Fail 2W014 105 Pass 2M015 110 Fail 2A016 105 Fail 2Q017 105 Fail 2A018 103 Pass 2F019 105 Fail 2A021 101 Pass 2A022 105 Pass From your suggested answer I don't any 'PassFailTable' ?
Please refer data above and table name, as suggested by Anonymous It worked but I don't have access to create new table on frontend.- Anonymous2 years agoNot applicable
Hi, Anonymous
New Table is done in Power BI Desktop as follows:
I don't know the calculation logic of your Measure CodePF.
In my example, my Measure PassOrFail is your Measure CodePF, you just need to change the corresponding parameter in the DAX formula of New Table:PassFailCountTable = SUMMARIZE ( ADDCOLUMNS ( 'WorkUnit', "PassOrFail", [CodePF] ), [CodePF], "Count", COUNTROWS ( 'WorkUnit' ) )
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- Anonymous2 years agoNot applicable
Thanks for your solution, but I don't have the access to create new table in Power BI. Can we do it by any other way without using new table ?