I have this single table PBI with sample data attached. and here is the scenario:
The idea is that Any combination of 2 slicers can be used in the report, the final output needed is count of ID’s that have an aggregated value ( based on applied filters) > = 1000
I have been able to get the numbers in the table, to identify the id’s that are >1000, and seem to work alright in the table.
But the issue remains in the card visual - that’s what should eventually tell the count of ID’s with revenue> 1000, currently, it doesn’t change when filters are applied.
In order to achieve the results based on the scenario that you’ve mentioned. Below is the DAX measure alongwith the screenshot of the final results provided -
IDs w/Revenue Threhold - Harsh = ----- 'Count of ID's with Revenue More Than or Equal To 1000'
VAR _Count_of_IDs_wrt_Revenue_More_Than_or_Equal_To_1000 =
COUNTROWS(
FILTER(
ADDCOLUMNS(
SUMMARIZE(
TestTable ,
TestTable[Accountid] ,
TestTable[Sub.PricingItemName] ,
TestTable[Sub.Platform] ,
TestTable[Sub.OfferName] ,
TestTable[Revenue] ) ,
"@Revenue" ,
CALCULATE( SUM( TestTable[Revenue] ) ,
ALLEXCEPT( TestTable , TestTable[Accountid] , TestTable[Sub.Platform] , TestTable[Sub.OfferName] ) ) ) ,
[@Revenue] >= 1000 ) )
VAR _Results =
IF( NOT ISBLANK( _Count_of_IDs_wrt_Revenue_More_Than_or_Equal_To_1000 ) ,
_Count_of_IDs_wrt_Revenue_More_Than_or_Equal_To_1000 ,
0 )
RETURN
_Results
Thank you for your response. The solution you have shared gave correct result only in one of the possible scenarios. ( combination of filter being used) - thats probably because i didnt explain the scenarios very well in my previous post
I had also been working on the solution and looks like i was taking the same approach as you did. but was slightly off . and looking at your solution helped me fix mine.
[The version2 CountRevenue >1000] gives me the result that i was looking for - the measure also has my old code commented out