Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register 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
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
71 | |
55 | |
37 | |
31 |
User | Count |
---|---|
87 | |
62 | |
61 | |
49 | |
45 |