Sum(TOTAL Sales) / Sum(TOTAL <Category> Sales)
The TOTAL qualifier in Power BI
Qlik's TOTAL qualifier makes an aggregation ignore the chart dimensions but keep the selections. In DAX that is ALLSELECTED. TOTAL <Field> keeps one dimension, which maps to removing only the other dimension columns.
What it does in Qlik
By default an aggregation in a chart is computed per combination of dimension values. TOTAL disregards the chart dimensions, so every row gets the total for the current selection. TOTAL <Field list> disregards all dimensions except the listed ones. This is the standard way to compute shares.
Qlik example
Sum(Sales) / Sum(TOTAL Sales) // share of total
Sum(Sales) / Sum(TOTAL <Category> Sales) // share within categoryPower BI equivalent
Share of total
Share of total =
DIVIDE ( [Sales], CALCULATE ( [Sales], ALLSELECTED () ) )Share within the parent category
Remove only the inner dimension. The row's Category filter stays.
Share in category =
DIVIDE ( [Sales], CALCULATE ( [Sales], ALLSELECTED ( Product[Name] ) ) )Visual calculation alternative
Visual calculations (on a table or matrix) work on the visual's own axes, which is closest to how Qlik thinks about a chart:
Share = DIVIDE ( [Sales], COLLAPSEALL ( [Sales], ROWS ) )Gotchas and behaviour differences
ALL()instead ofALLSELECTED()also ignores slicers, which is{1} TOTALin Qlik terms, notTOTAL.ALLSELECTEDbehaves unexpectedly when the measure is called inside an iterator. Keep share-of-total measures at the top level of a visual.- In DAX, visual-level filters (for example a Top N filter on the visual) are part of what
ALLSELECTEDrestores. A share can then add up to 100% of the visible rows, not of the whole selection.
Official documentation
- Defining the aggregation scope (TOTAL) (Qlik Help)
- ALLSELECTED function (DAX) (Microsoft Learn)
- Using visual calculations in Power BI Desktop (Microsoft Learn)
- ALLSELECTED (dax.guide)
Related pages
Sum({1} Sales) / Sum({<Region=>} Sales)
Ignoring selections: {1}, Field= and {1<...>}
How to translate Qlik's {1} set identifier and empty field modifiers (Region=) into REMOVEFILTERS, ALL and ALLSELECTED. Includes the important difference in how chart dimensions are treated.
Partial / different approach
Avg(Aggr(Sum(Sales), Customer))
Aggr (nested aggregation)
Aggr builds a virtual table of aggregated values, for example sales per customer, so you can aggregate again. In DAX that is an iterator (AVERAGEX, MAXX, COUNTROWS(FILTER(...))) over VALUES or SUMMARIZE that calls a measure.
Partial / different approach
Rank(Sum(Sales))
Rank
Qlik's Rank() ranks rows within the current column segment and has its own tie modes and a text format ("3 - 4"). In DAX, use RANKX or the newer RANK window function. Pick the ties option deliberately.
Partial / different approach
Spotted an error or a better pattern? QlikToDax is maintained by a working BI consultant; corrections are welcome via the About page. Last reviewed 2026-10-25.