Forum Discussion
Chandrashekar
4 years agoResolver III
Tretas : Not getting count based on variable
Hello Team, am trying to get count of priority am using below code but it is not working. Inflow_Priority = var CompanyRegionAU_Company = Max(CompanyRegionAU[Company]) Var CompanyRegi...
- 4 years ago
Great!
Please accept the solution(s) that resolved your question in order to mark it as accepted so future readers can find it more quickly.
Chandrashekar
4 years agoResolver III
Hello Team,
Please see attached example report Sample Report as am trying to get priority count am using below code but it is not working.
smpa01
4 years agoCommunity Champion
Chandrashekar I am guessing you are expecting this
To reach the following outcome, you need two measures
_countrows =
VAR _name =
MAX ( Table3[Name] )
VAR _location =
MAX ( Table3[Location] )
VAR _tbl =
CROSSJOIN (
SELECTCOLUMNS ( { _name }, "name", [Value] ),
SELECTCOLUMNS ( { _location }, "location", [Value] )
)
RETURN
CALCULATE (
COUNTROWS ( FILTER ( Table1, Table1[Priority] = 1 ) ),
TREATAS ( _tbl, Table1[Name], Table1[Location] )
)
Sum = SUMX(Table3,[_countrows])
- Chandrashekar4 years agoResolver III
Hello,
I need to Priority1 and Pririty 2 in two different columns.
Regards,
Chandrashekar B