Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
95 | |
80 | |
67 | |
62 |
User | Count |
---|---|
147 | |
109 | |
107 | |
85 | |
63 |