• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

i want to use index function to get data from data model to another

harman1213

New Member
i have 2 data model in power bi-1 Formatted Orders data model i have 3 column Shipping State ,Grand Total and Carrier.
2 Courier pricing data model i have column name Regions AR is header contains name of Regions A2 to a27 and similarly i have carrier name in header from b1 to m1 and it contain pricing in b2 to m27 of all carrier according to region motioned in column A.

No i want to pull data from Courier pricing table to formatted order 1st it will check Grand total in formatted order is not blank, then it will match Shipping State from formatted order with Regions in Courier pricing and then it will match Carrier from formatted order with header (B1 to M1) of Courier pricing and return me the price of carrier. I am attaching here sample file for your reference.
 

Attachments

  • Sample File.xlsx
    10.7 KB · Views: 2
But you have no model in your sample.
As well, your pricing table should be flattened out.

It is critical in PowerBI and DAX to know your data schema and also how and where you are displaying data.
DAX is evaluated by context of calculation and will return different result depending on this.

Pricing - In query editor, select every column except Regions. Unpivot columns.
Rest will depend on your use case. If you are thinking of doing calculated column. Don't.
It's far more efficient to use Merge operation in query editor. Using Shipping State & Carrier as key columns.
 
Back
Top