The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello guys,
I'm starting my journey in Power BI.
I have these 2 columns:
The tables are connected via the item_code column. Comsumer Price Index belongs to the CPIData Table.
I need to find out what is the item name with the highest consumer price index.
Could you please help?
Solved! Go to Solution.
@LuisNC Try something like this in a Card visual:
Measure =
VAR __HighestPrice = MAX('CPIData'[Consumer Price Index])
VAR __ProductCode = MAXX(FILTER('CPIData',[Consumer Price Index] = __HighestPrice),[item_code])
VAR __Item = MAXX(FILTER('CPIItem', [item_code] = __ProductCode),[item_name])
RETURN
__Item
@Greg_Deckler thank you so much for your prompt reply. I'll take some time to understand and try your code 😉 cheers
@LuisNC Try something like this in a Card visual:
Measure =
VAR __HighestPrice = MAX('CPIData'[Consumer Price Index])
VAR __ProductCode = MAXX(FILTER('CPIData',[Consumer Price Index] = __HighestPrice),[item_code])
VAR __Item = MAXX(FILTER('CPIItem', [item_code] = __ProductCode),[item_name])
RETURN
__Item
User | Count |
---|---|
28 | |
10 | |
8 | |
6 | |
5 |
User | Count |
---|---|
33 | |
13 | |
12 | |
9 | |
7 |