Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
hello,
I have two measures, one measure gives me appropriate results, one measure and the number of inappropriate results. In the table, I have a value of appropriate and inappropriate value. How can I make one measure that will be included appropriately and inappropriately according to the selected value in the column?
Thanks
Solved! Go to Solution.
Hi @LeaRupnik ,
According to my tests, it is possible to customize a filter. Then modify the following MEASURE formula:
M1 =
VAR a =
SELECTEDVALUE ( Table_slicer[Type] )
RETURN
SWITCH (
a,
"x",
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER (
ALL ( 'Table' ),
'Table'[test] = a
&& 'Table'[test] = MAX ( 'Table'[test] )
)
),
"ok",
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER (
ALL ( 'Table' ),
'Table'[test] = a
&& 'Table'[test] = MAX ( 'Table'[test] )
)
)
)
M2 =
VAR a =
SELECTEDVALUE ( Table_slicer[Type] )
RETURN
SWITCH (
a,
"x",
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER (
ALL ( 'Table' ),
'Table'[test2] = a
&& 'Table'[test2] = MAX ( 'Table'[test2] )
)
),
"ok",
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER (
ALL ( 'Table' ),
'Table'[test2] = a
&& 'Table'[test2] = MAX ( 'Table'[test2] )
)
)
)
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @LeaRupnik ,
Based on your description, you can create the following measure and use the Edit interaction function to present your requirements:
Result = IF(MAX('Table'[test])==MAX('Table'[test2]),"uspesno","neuspesno")
M1 = CALCULATE(COUNTROWS('Table'),ALLEXCEPT('Table','Table'[test]))
M2 = CALCULATE(COUNTROWS('Table'),ALLEXCEPT('Table','Table'[test2]))
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
if I select "unsuccessful" in the result together, and I would compile a table with a new column where M1 = 3 in M2 = 2 can be written
how can I attach the attachment
thx
Hi @LeaRupnik ,
Measure is valued according to the filtering context, and it is not possible to combine multiple measures on the same column. It is better to see measure as a separate field to form a table visual.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
i nead like this
Hi @LeaRupnik ,
According to my tests, it is possible to customize a filter. Then modify the following MEASURE formula:
M1 =
VAR a =
SELECTEDVALUE ( Table_slicer[Type] )
RETURN
SWITCH (
a,
"x",
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER (
ALL ( 'Table' ),
'Table'[test] = a
&& 'Table'[test] = MAX ( 'Table'[test] )
)
),
"ok",
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER (
ALL ( 'Table' ),
'Table'[test] = a
&& 'Table'[test] = MAX ( 'Table'[test] )
)
)
)
M2 =
VAR a =
SELECTEDVALUE ( Table_slicer[Type] )
RETURN
SWITCH (
a,
"x",
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER (
ALL ( 'Table' ),
'Table'[test2] = a
&& 'Table'[test2] = MAX ( 'Table'[test2] )
)
),
"ok",
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER (
ALL ( 'Table' ),
'Table'[test2] = a
&& 'Table'[test2] = MAX ( 'Table'[test2] )
)
)
)
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
test | test2 | rezultat skupni |
ok | ok | uspesno |
ok | ok | uspesno |
x | ok | neuspesno |
x | x | neuspesno |
x | ok | neuspesno |
ok | x | neuspesno |
test1_neuspesni = 3 | test1_uspesni = 3 | |
test2_neuspesni = 2 | test2_uspesni = 4 | |
test1 nov = if(rezultat skupni = uspesno; 3, 3) | ||
test2 nov = if(rezultat skupni = uspesno; 4, 2) |
test1 nov and test2 nov are strangers
Thx
Lea
I did the installation and i have only shown this. Please help
@LeaRupnik Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
13 | |
6 | |
4 | |
3 | |
2 |
User | Count |
---|---|
14 | |
10 | |
5 | |
3 | |
3 |