Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Solved! Go to Solution.
Hi @Anonymous ,
I created some data:
You can use the following dax:
Total Sales 2022 III =
VAR SelectedBrand = SELECTEDVALUE('DATA'[Brand])
VAR SelectedSKU = SELECTEDVALUE('DATA'[SKU])
return
IF(
ISFILTERED('DATA'[Brand])&&NOT(ISFILTERED('DATA'[SKU])),
SUMX(
FILTER(ALL('DATA'),
'DATA'[Brand]=SelectedBrand &&'DATA'[Time period]=2022),[Sales (€)])
,
IF(
ISFILTERED('DATA'[SKU]),
SUMX(
FILTER(ALL('DATA'),
'DATA'[Time period]=2022&&'DATA'[SKU]=SelectedSKU),[Sales (€)])
,
IF(
NOT(ISFILTERED('DATA'[Brand]))&&NOT(ISFILTERED('DATA'[SKU])),
SUMX(
FILTER(ALL('DATA'),
'DATA'[Time period]=2022),[Sales (€)])
)))
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
I created some data:
You can use the following dax:
Total Sales 2022 III =
VAR SelectedBrand = SELECTEDVALUE('DATA'[Brand])
VAR SelectedSKU = SELECTEDVALUE('DATA'[SKU])
return
IF(
ISFILTERED('DATA'[Brand])&&NOT(ISFILTERED('DATA'[SKU])),
SUMX(
FILTER(ALL('DATA'),
'DATA'[Brand]=SelectedBrand &&'DATA'[Time period]=2022),[Sales (€)])
,
IF(
ISFILTERED('DATA'[SKU]),
SUMX(
FILTER(ALL('DATA'),
'DATA'[Time period]=2022&&'DATA'[SKU]=SelectedSKU),[Sales (€)])
,
IF(
NOT(ISFILTERED('DATA'[Brand]))&&NOT(ISFILTERED('DATA'[SKU])),
SUMX(
FILTER(ALL('DATA'),
'DATA'[Time period]=2022),[Sales (€)])
)))
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 38 | |
| 36 | |
| 29 | |
| 28 |
| User | Count |
|---|---|
| 127 | |
| 88 | |
| 78 | |
| 66 | |
| 64 |