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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Here is the question :
If you select Year = 2018, all the data with Year=2018 will get filtered(yellow highlighted data), But I want the data which is present on right side as my output.
According to me we need to have one measure which will compare 2018 with values in "Plan year" and gives output.
DAX should be something like this:
Result = calculate(sum(Sales), Filter (SELECTEDVALUE(Table[year]) = substring (Table[PlanYear])))
I have sample data as below,
Any help is appreciated.
Thanks!!
Solved! Go to Solution.
Thanks @v-lili6-msft for your efforts,
The one you posted should also work and meanwhile I have found other way as well.
For that you need to
1. create calculated column
2.
Planned_year_month_filtered = CONTAINSSTRINGEXACT('Plan Variance'[Planned_year_month],'Plan Variance'[Year])
3. Then drag the column under visual level filter and set it to "True"
The desired output is displayed!!
But CONTAINSSTRINGEXACT is present in March 2019 release only.
hi, @Anonymous
After my test, you could try this measure:
Measure = CALCULATE(SUM('Table'[Sales]),FILTER('Table',SEARCH(SELECTEDVALUE('Table'[Year]),'Table'[Plan year],1,0)>0))
Result:
here is sample pbix file, please try it.
Best Regards,
Lin
Thanks @v-lili6-msft for your efforts,
The one you posted should also work and meanwhile I have found other way as well.
For that you need to
1. create calculated column
2.
Planned_year_month_filtered = CONTAINSSTRINGEXACT('Plan Variance'[Planned_year_month],'Plan Variance'[Year])
3. Then drag the column under visual level filter and set it to "True"
The desired output is displayed!!
But CONTAINSSTRINGEXACT is present in March 2019 release only.
hi, @Anonymous
It's pleasant that your problem has been solved, could you please mark the reply as Answered?
Best Regards,
Lin
User | Count |
---|---|
97 | |
78 | |
77 | |
48 | |
26 |