Forum Discussion
admin11
Memorable Member
4 years agoHow to compute Brand by SOURCE ?
HI All parry2k help me with the below post :- https://community.powerbi.com/t5/Desktop/How-to-use-DAX-expression-to-count-number-of-brand-sales-gt-100K/td-p/2262931 Now i manage to comput...
Jihwan_Kim
Super User
4 years agoHi,
Please check the below picture.
Brand Rank Count: =
CALCULATE (
COUNTROWS ( VALUES ( SALES_T[BRAND_C] ) ),
FILTER ( SALES_T, SALES_T[SOURCE] IN { "TA", "TP" } )
)
parry2k
Super User
4 years agoJihwan_Kim good solution if you want to filter on these two sources but using FILTER is not recommended since it is an iterator it will be very slow when working with large data. Just my 2 cents. The measure should look like this:
Brand Rank Count: =
CALCULATE (
COUNTROWS ( VALUES ( SALES_T[BRAND_C] ) ),
SALES_T[SOURCE] IN { "TA", "TP" }
)