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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Return Value from other column

Hey,

Can you help me with this problem that I face here?

 

I have two tables as shown below:

Annotation 2020-04-14 135848.png

 

any idea how to get value as the expected column?

 

thank you

 
1 ACCEPTED SOLUTION

Hi, @Anonymous 

 

Based on your description, you may create a measure as below.

 

Pricing Value = 
var _date = SELECTEDVALUE(Takeup[Date])
var _type = SELECTEDVALUE(Takeup[Type])
return
CALCULATE(
    AVERAGE(Pricing[Value]),
    FILTER(
        ALLSELECTED(Pricing),
        Pricing[Date] = _date&&
        Pricing[Type] = _type
    )
)

 

 

Result:

h1.png

 

Best Regards

Allan

 

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

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

If you take Simply the Avg or Value and expected it will work in visuals


In pricing table
new column Expected= if(Table[Type]="A",5, if (Table[Type]="B",10,15))

New Table =
summarize(Table,Table[ID],Table[Type],"Take up value",Max(Table[Expected]),"Expected",max(Table[Expected]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
vivran22
Community Champion
Community Champion

Hello @Anonymous ,

 

You may try following as New table:

 

Takeup Table = 
SUMMARIZE(
    PricingData,
    PricingData[ID],
    PricingData[Type],
    "Takeup Value",AVERAGE(PricingData[Expected]),
    "Expected",AVERAGE(PricingData[Value])
)

 

1.PNG

 

Alternatively, you could also use Group By feature in Power Query.

 

Cheers!
Vivek

If it helps, please mark it as a solution
Kudos would be a cherry on the top 🙂

https://www.vivran.in/

Connect on LinkedIn

Anonymous
Not applicable

Sorry, I guess I wrongly asking the question.

The pricing value is averaged to the take up table, based on type.

Actually there also a date column on the table.

 

Annotation 2020-04-14 144323.png

Hi, @Anonymous 

 

Based on your description, you may create a measure as below.

 

Pricing Value = 
var _date = SELECTEDVALUE(Takeup[Date])
var _type = SELECTEDVALUE(Takeup[Type])
return
CALCULATE(
    AVERAGE(Pricing[Value]),
    FILTER(
        ALLSELECTED(Pricing),
        Pricing[Date] = _date&&
        Pricing[Type] = _type
    )
)

 

 

Result:

h1.png

 

Best Regards

Allan

 

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

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors