Forum Discussion
dynamically Data from Two table using slicer in card
- Anonymous2 years ago
Hi, Krishna_14hcl
I created a measure and replaced the data from Table1 with the data for the Table2 country, as shown in the following image
Here is the DAX:
Dynamic Sales = VAR SelectedCountry = SELECTEDVALUE ( 'Table2'[Country], "All" ) RETURN IF ( SelectedCountry = "All", SUMX ( 'Table1', 'Table1'[Sales1] ), CALCULATE ( SUM ( 'Table2'[Sales] ), 'Table2'[Country] = SelectedCountry ) )Then create a measure to calculate the totals for Table1
DAX:
Dynamic Sales Total = SUMX('Table1','Table1'[Dynamic Sales])How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data)
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, Krishna_14hcl
I created a measure and replaced the data from Table1 with the data for the Table2 country, as shown in the following image
Here is the DAX:
Dynamic Sales =
VAR SelectedCountry =
SELECTEDVALUE ( 'Table2'[Country], "All" )
RETURN
IF (
SelectedCountry = "All",
SUMX ( 'Table1', 'Table1'[Sales1] ),
CALCULATE ( SUM ( 'Table2'[Sales] ), 'Table2'[Country] = SelectedCountry )
)
Then create a measure to calculate the totals for Table1
DAX:
Dynamic Sales Total = SUMX('Table1','Table1'[Dynamic Sales])
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data)
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.