Forum Discussion
Chandrashekar
Resolver III
4 years agoTretas : 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
Super User
4 years agoThe 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] )
)
Chandrashekar
Resolver III
4 years agoHello 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 ago
Resolver III
Hello Alex,
Sorry it is my mistake(Format issue it was text and turned to Number) and it is working now.
- AlexisOlson4 years ago
Super 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.