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.
AlexisOlson
4 years agoSuper User
The cross join construction feels odd to me.
I think I'd try writing this DAX more like this:
Inflow_Priority =
CALCULATE (
COUNTROWS ( Source ),
FILTER ( ALL ( Source ), Source[Priority_is] = 1 ),
TREATAS (
SUMMARIZE ( CompanyRegionAU, CompanyRegionAU[Company], CompanyRegionAU[Region] ),
Source[company], Source[Region]
),
TREATAS ( VALUES ( Queue[Queue] ), Source[Queue] )
)
- Chandrashekar4 years agoResolver III
Hello Alex,
I tried your solution but it is not working. I need Priority 1 and Priority 2 in different columns.
Regards,
Chandrashekar B
- Chandrashekar4 years agoResolver III
Hello Alex,
Sorry it is my mistake(Format issue it was text and turned to Number) and it is working now.
- AlexisOlson4 years agoSuper User
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.