Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello Team,
I have a table with the below details and would like to see the percentage as per the selection in list box.
Team | Status |
A | Won |
B | Draw |
C | Lost |
A | Won |
B | Lost |
C | Draw |
A | Lost |
B | Won |
C | Won |
A | Draw |
B | Won |
C | Lost |
The List Box Will have the option A, B and C and other list box will have Won, Lost and Draw. if we choose A and Won, a Card should display the percentage of A Won and similary for other values.
Solved! Go to Solution.
Hi @visualenthusias ,
I have created a simple sample, please refer to my pbix file to see if it helps you.
Measure =
VAR _1 =
SELECTEDVALUE ( 'status'[Status] )
VAR _2 =
SELECTEDVALUE ( team[Team] )
VAR _re =
IF (
_2 = BLANK ()
&& _1 <> BLANK ()
&& _1 = SELECTEDVALUE ( 'Table'[Status] ),
1,
IF (
_2 <> BLANK ()
&& _1 = BLANK ()
&& _2 = SELECTEDVALUE ( 'Table'[Team] ),
1,
IF (
_2 <> BLANK ()
&& _1 <> BLANK ()
&& _1 = SELECTEDVALUE ( 'Table'[Status] )
&& _2 = SELECTEDVALUE ( 'Table'[Team] ),
1,
0
)
)
)
RETURN
_re
Measure2 =
VAR _1 =
COUNTAX ( ALL ( 'Table' ), 'Table'[Team] )
VAR _2 =
COUNTAX ( FILTER ( ALL ( 'Table' ), [Measure] <> 0 ), 'Table'[Team] )
RETURN
_2 / _1
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @visualenthusias ,
I have created a simple sample, please refer to my pbix file to see if it helps you.
Measure =
VAR _1 =
SELECTEDVALUE ( 'status'[Status] )
VAR _2 =
SELECTEDVALUE ( team[Team] )
VAR _re =
IF (
_2 = BLANK ()
&& _1 <> BLANK ()
&& _1 = SELECTEDVALUE ( 'Table'[Status] ),
1,
IF (
_2 <> BLANK ()
&& _1 = BLANK ()
&& _2 = SELECTEDVALUE ( 'Table'[Team] ),
1,
IF (
_2 <> BLANK ()
&& _1 <> BLANK ()
&& _1 = SELECTEDVALUE ( 'Table'[Status] )
&& _2 = SELECTEDVALUE ( 'Table'[Team] ),
1,
0
)
)
)
RETURN
_re
Measure2 =
VAR _1 =
COUNTAX ( ALL ( 'Table' ), 'Table'[Team] )
VAR _2 =
COUNTAX ( FILTER ( ALL ( 'Table' ), [Measure] <> 0 ), 'Table'[Team] )
RETURN
_2 / _1
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @amitchandak - We haev the below error.
A function 'CALCULATE' has been used in a True/False expression that is used as a table filter expression. This is not allowed.
@visualenthusias , A new measure
calculate(countrows(Table), calculate(countrows(Table), removefilters(Table[Status]) ) )
User | Count |
---|---|
87 | |
72 | |
69 | |
64 | |
54 |
User | Count |
---|---|
99 | |
91 | |
80 | |
74 | |
64 |