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.
Hi,
I have a small problem with DAX... How do I count Sta.Dev above 0.5?
(Concentrations are grouped by Month, Date and CowNo)
Solved! Go to Solution.
Hi @Hitman,
Please create a measure using the formula and check if it works fine.
result = CALCULATE ( COUNTROWS ( ALLSELECTED ( Table[Standardndeviation of concentration] ) ), FILTER ( Table, [Sta.Dev] > 0.5 && Table[CowNO] = "Standardndeviation of concentration" ) )
Table means your resource table. I test it using my sample table, it works successfully. Please see the following steps in my scenario.
1. My sample table named "Table4"
2. Create a visual like you, click "See data", I want to count "Count of region"(the value in visual) above 1.
3. So I create a measure using the formula.
result = CALCULATE(COUNTROWS(ALLSELECTED(Table4[Region])),FILTER(Table4,COUNTA(Table4[Region])>1&&Table4[Region]="B"))
I will get the expected result.
Best Regards,
Angelia
Hi @Hitman,
If i understand it correctly you want a count of all the sta.dev that are 0.5 or higher.
you could try this code:
Measure = COUNTROWS(filter(table1,table1[sta.dev]>=0.5))
I have'nt test it so let me know if it works !
regards,
L.Meijdam
Hi @Anonymous,
Thank you for your reply.
The chanllange for me is to get "table1".
Screendump is from "See Data" of the visual. Here the table is generated, but how do I do that with DAX syntax?
How can I get DAX to understand that the count/filter functions should be applyed after a list of standard deviations has been made?
Best Regards,
H.
Hi @Hitman,
Please create a measure using the formula and check if it works fine.
result = CALCULATE ( COUNTROWS ( ALLSELECTED ( Table[Standardndeviation of concentration] ) ), FILTER ( Table, [Sta.Dev] > 0.5 && Table[CowNO] = "Standardndeviation of concentration" ) )
Table means your resource table. I test it using my sample table, it works successfully. Please see the following steps in my scenario.
1. My sample table named "Table4"
2. Create a visual like you, click "See data", I want to count "Count of region"(the value in visual) above 1.
3. So I create a measure using the formula.
result = CALCULATE(COUNTROWS(ALLSELECTED(Table4[Region])),FILTER(Table4,COUNTA(Table4[Region])>1&&Table4[Region]="B"))
I will get the expected result.
Best Regards,
Angelia
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |