Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hello,
I am a novice user of Power Query.
I have a problem I cant figure out.
Grateful for the assistance.
here is what I need to do :
I have 2 Connections in Power Query (the pivoted data set based on the raw excel data and the rate table)
I dont know how I can add the rate to the pivoted data set.
Maybe its an IF statement?
Below is a link to the file since I cant upload on this website.
https://1drv.ms/x/s!AkvCjNvcBhpQiPRV5B_j-qzVOgpMhQ?e=PmHewK
the rate table:
this is the pivoted table and I want to append the rate above to this table (according to the criteria):
Any assistance is greatly appreciated. Thank you
Solved! Go to Solution.
Hi @Centaur
You can create a measure to get the rate according to project ID and dates periods. Put this measure into Values of your pivot table. I create the following sample with Power BI. It's similar in Excel's Power Pivot table.
m_Rate =
var __date = MAX('data'[dte])
var __projID = MAX('data'[ProjID])
return
CALCULATE(MAX(Rates[Rate]),'Rates'[ProjectID]=__projID,'Rates'[Date From]<=__date,Rates[Date To]>__date)
Reference:
Measures in Power Pivot (microsoft.com)
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi @Centaur
You can create a measure to get the rate according to project ID and dates periods. Put this measure into Values of your pivot table. I create the following sample with Power BI. It's similar in Excel's Power Pivot table.
m_Rate =
var __date = MAX('data'[dte])
var __projID = MAX('data'[ProjID])
return
CALCULATE(MAX(Rates[Rate]),'Rates'[ProjectID]=__projID,'Rates'[Date From]<=__date,Rates[Date To]>__date)
Reference:
Measures in Power Pivot (microsoft.com)
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi, thank you for the response. I will try to implement but I want to ask a question first. After looking at the header row, the dates are not in order in my sample file posted. you can see they are out of order if you scroll all the way to the right. I am not sure why PQ is sorting in this fashion. I need all of the dates in order from left to right. Do you see what i am referring to? do you happen to know why it does this? I have resorted to using excel but I would like to have a PQ solution as well.
here is a screen shot
must scroll all way to the right.
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 13 | |
| 11 | |
| 8 | |
| 7 | |
| 6 |