Forum Discussion
Quest
4 years agoAdvocate I
Problem with calculating values
There is a calculation I am trying to achieve: The data in my report is something like below: Date Product Type #Subscribed 7/1/2021 A Web 2 7/1/2021 A Desktop 5 7/1/2021 B W...
- 4 years ago
Quest please try this
Measure = CALCULATE ( CALCULATE ( DISTINCTCOUNT ( 'Table'[Product] ), CALCULATETABLE ( 'Table', FILTER ( ADDCOLUMNS ( 'Table', "@count", CALCULATE ( SUM ( 'Table'[#Subscribed] ), ALLEXCEPT ( 'Table', 'Table'[Date], 'Table'[Product] ) ) ), [@count] >= 10 ) ) ), ALLEXCEPT ( 'Table', 'Table'[Date] ) )
Jihwan_Kim
4 years agoSuper User
Hi,
I am not sure if I understood your question correctly, but check the below picture and the attached pbix file.
No. of Product : =
VAR newtable =
FILTER (
ADDCOLUMNS (
VALUES ( Data[Product] ),
"@subscribedIrrespectiveofType", CALCULATE ( SUM ( Data[#Subscribed] ), ALL ( Data[Type] ) )
),
[@subscribedIrrespectiveofType] >= 10
)
RETURN
IF ( HASONEVALUE ( Data[Date] ), COUNTROWS ( newtable ) )