Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Solved! Go to Solution.
Hi @Ilias_PAB ,
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 @Ilias_PAB ,
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.
User | Count |
---|---|
106 | |
86 | |
81 | |
74 | |
71 |
User | Count |
---|---|
112 | |
101 | |
96 | |
74 | |
67 |