Forum Discussion
jishnubhattacha
Helper I
6 months agoShow maximum Yearmonth Value selected in the Dropdown.
I am working on Tableau to Power BI Migration. In one of my report I have a dropdown which showing Year Month in tableau. The Yearmonth dropdown by default is showing maximum Yearmonth value of the t...
- 6 months ago
Hi jishnubhattacha
As per my understanding of your requirement, could you please try the steps below?
1. disconnected table which you have already created .
Disconnected_YearMonth =
DISTINCT(FactTable[YearMonth])
2. Create a 1st measure .
Selected YearMonth =
VAR SelectedYM =
SELECTEDVALUE(Disconnected_YearMonth[YearMonth])
RETURN
IF(
ISBLANK(SelectedYM),
MAX(FactTable[YearMonth]),
SelectedYM
)
3. Third measure.
Total Sales (Selected YM) =
CALCULATE(
SUM(FactTable[Sales]),
FactTable[YearMonth] = [Selected YearMonth]
)
If this answers your questions, kindly accept it as a solution and give kudos.
jishnubhattacha
Helper I
6 months agoThank you for the response. I will implement the snippet and if it is working then I will accept it as a solution but if it not works then I will ask you once again