Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Arunsaikiran
Regular Visitor

Get to display Text values from a column in table using another column value from the same Table.

Hi guys

1. I have created a measure which changes upon selecting a city name in slicer.

city_filt = CALCULATE(min('city-slicer (2)'[city_name]),ALLSELECTED('city-slicer (2)'))
2. I have created another measure which uses this measure 'city_filt' to give the maximum revenue based on our selection in slicer.
max_rev_month = CALCULATE(MAX(revenue[plan_revenue]),FILTER(dim_cities,dim_cities[city_name]=[city_filt]))
3. Now I am trying to display the date corresponding to this measure 'max_rev_month'  and the selected city 'city_filt' which is in the same table.
I tried
max_month =
CALCULATE(min(plan_revenue[date]),
FILTER(plan_revenue,
plan_revenue[plan_revenue] = [max_rev_month]),
FILTER(fact_plan_revenue,
plan_revenue[city_code] = [city_filt]
))
I am getting the minimum date but not the exact date matching these two measures ([max_rev_month],[city_filt]). Please guide me in this
3 REPLIES 3
Arunsaikiran
Regular Visitor

Arunsaikiran_2-1670586536690.png                                                    Arunsaikiran_1-1670586443142.png

From the above table I am trying to get the date of the row where value in plan_revenue matches

with the the selected value from the city_name.

My expected output is the date where plan_revenue value = value from measure max_rev_month 

                                               

 

v-jialluo-msft
Community Support
Community Support

Hi  @Arunsaikiran ,

 

You can try this:

max_rev_month = CALCULATE(MAX(revenue[plan_revenue]),FILTER(ALL(dim_cities),dim_cities[city_name]=[city_filt]))

max_month =
CALCULATE(min(plan_revenue[date]),
FILTER(ALL(plan_revenue),
plan_revenue[plan_revenue] = [max_rev_month]),
FILTER(ALL(fact_plan_revenue),
plan_revenue[city_code] = [city_filt]
))

If that's not what you need, provide sample files and expected output.

 

Best Regards,
Gallen Luo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

FreemanZ
Super User
Super User

would be good to provide some sample data.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.