Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
hello, there is a help to make the Pivot table in the picture in a power query.
Picture of the table below. It will make the job much easier and simpler in a situation like the first picture.
https://1drv.ms/x/s!AmP8SNf-sgJ7n05LkqLxDYSprZTj?e=bMvHMq
Solved! Go to Solution.
ThisWorkbook.Connections("Combined_Financials_Sector").Refresh
note that Background refresh option should be checked. In the Excel UI, you can access this setting by clicking on "Connections" in the "Data" ribbon, selecting a connection, and clicking on "Properties". The "Enable background refresh" setting is in the dialog box that opens.
Proud to be a Super User!
@Anonymous- Check this PBIX file out. Let me know if this works for you.
As @rubayatyasmin suggested, you can accomplish this by utilizing the Matrix visuals. In the attached file, you'll find the specific steps that were followed. Moreover, you can reach the same outcome by deactivating the SteppedLayout and adopting the classic style.
Hi @Manoj_Nair
This is not the Result I want.
in the Template below.
Can this result be done with the power query in excel?
To my knowledge, you can not achieve the same result in PQ.
I am curious if it's possible. Let me know here if you are able to accomplish it in PQ. Maybe some advanced M code can do the trick.
Proud to be a Super User!
you're right, it's a difficult process.
If I import it directly from the power query as a pivot table report, I have a problem.
I am currently renewing with these codes.
Private Sub CommandButton1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Sheets("Combined_Financials").Range("Combined_Financials_Sector").ListObject.QueryTable.Refresh BackgroundQuery:=True
Sheets("Symbols_Price").Range("Combined_Price_Sector").ListObject.QueryTable.Refresh BackgroundQuery:=True
End Sub
How do I refresh the "Combined_Financials_Sector" in the background.
ThisWorkbook.Connections("Combined_Financials_Sector").Refresh
note that Background refresh option should be checked. In the Excel UI, you can access this setting by clicking on "Connections" in the "Data" ribbon, selecting a connection, and clicking on "Properties". The "Enable background refresh" setting is in the dialog box that opens.
Proud to be a Super User!
I did what you said but I am getting error.
Can you paste the error? It would be easy to troubleshoot.
Thanks
Proud to be a Super User!
@Anonymous
The "Run-time error 9: Subscript out of range" typically occurs when the specified object or element does not exist within the collection. In this case, the error is likely due to the fact that there is no connection named "Combined_Financials_Sector" in the workbook connections.
To resolve this error, you should check if the connection name is correct and make sure that the connection exists in the workbook. To verify the connection name, you can follow these steps:
If you find the correct connection name, you can use the following VBA code to refresh the connection in the background with the "Enable background refresh" option checked:
This code will try to refresh the connection, and if it doesn't find the connection, it will simply resume the code without raising an error. However, it's essential to make sure that the connection name is correct and exists in the workbook.
If you are still encountering the error after verifying the connection name, please double-check the name spelling and ensure that there are no typos or extra spaces in the connection name. Also, make sure that the connection is created before trying to refresh it programmatically.
Proud to be a Super User!
I checked what you wrote but there is no workbook link.
I checked what you wrote but there is no workbook link.
I am updating the pivot table.
Private Sub CommandButton1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Sheets("Symbols_Price").Range("Combined_Price_Sector").ListObject.QueryTable.Refresh BackgroundQuery:=True
Worksheets("PT_C").PivotTables("PivotTable1").PivotCache.Refresh
End Sub
It continues to download in the background but I get another error.
Actually, I just need to press "end" for the refresh to finish.
Sorry, this is not English. I can not read it.
Proud to be a Super User!
@rubayatyasmin
"note that Background refresh option should be checked. In the Excel UI, you can access this setting by clicking on "Connections" in the "Data" ribbon, selecting a connection, and clicking on "Properties". The "Enable background refresh" setting is in the dialog box that opens."
I marked the place you mentioned here. but still i am getting error.
This may be the poorest table design I've ever seen.
If you have an opinion on the problem, I'd love to hear it.What is the Bad Thing?
Düştüm mapus damlarına öğüt veren bol olur
Toplasam o öğütleri burdan köye yol olur
Hi, @Anonymous
this is what I could achieve in PQ
though not an exact pivot table like Excel. You could use Power BI matrix visual as an alternative to the Excels pivot table.
Proud to be a Super User!
It's far from the result I want. I am already using the result you showed. thanks
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.