Forum Discussion
Anonymous
4 years agoNot applicable
Subcategory Net sales
Hi Power BI Users, I am having Category1, category 2 and sales in my Table as below. I want net sales for category 2 excluding category. All dax is giving misccelaneous output. Can you guys help ...
- Anonymous4 years ago
Hi Anonymous ,
You can create a measure as below to get the category Net sales, please find the details in the attachment.
Category Net sales = VAR _tab = SUMMARIZE ( 'Table', 'Table'[Category], "@ssales", CALCULATE ( SUM ( 'Table'[sales] ), ALLEXCEPT ( 'Table', 'Table'[Category] ) ) ) RETURN SUMX ( _tab, [@ssales] )Best Regards
Anonymous
4 years agoNot applicable
Hi Anonymous ,
You can create a measure as below to get the category Net sales, please find the details in the attachment.
Category Net sales =
VAR _tab =
SUMMARIZE (
'Table',
'Table'[Category],
"@ssales", CALCULATE ( SUM ( 'Table'[sales] ), ALLEXCEPT ( 'Table', 'Table'[Category] ) )
)
RETURN
SUMX ( _tab, [@ssales] )
Best Regards