Forum Discussion
Dynamic conditional formatting for gauge tile
let
Source = Excel.Workbook(File.Contents("C:\Users\61431\Desktop\GCC\BI\FY21 Budget for Power BI.xls"), null, true),
Transposed1 = Source{[Name="Transposed"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(Transposed1, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Account", type date}, {"Consulting Revenue (202)", type number}, {"Cost Recoveries (203)", type number}, {"Interest Income (270)", Int64.Type}, {"Management Fee Income (299)", Int64.Type}, {"Other Revenue (260)", Int64.Type}, {"Total Income", type number}, {"Consulting Expenses (302)", type number}, {"Contractors (304)", type number}, {"Direct Annual Leave Expense (309)", Int64.Type}, {"Direct Superannuation (308)", type number}, {"Direct Wages and Salaries (307)", type number}, {"Discounts Provided (303)", Int64.Type}, {"Wage offset to align budget & actuals (310)", Int64.Type}, {"Total Cost of Sales", type number}, {"Gross Profit", type number}, {"Gain/(Loss) on Sale of Assets (250)", Int64.Type}, {"JobKeeper (261)", Int64.Type}, {"PAYG Cashboost ATO (311)", Int64.Type}, {"Total Other Income", Int64.Type}, {"Advertising (400)", Int64.Type}, {"Annual Leave Expense (476)", Int64.Type}, {"Bad Debt Expense (402)", Int64.Type}, {"Bank Fees (404)", type number}, {"Bank Revaluations (497)", Int64.Type}, {"Bookkeeping (408)", Int64.Type}, {"Conferences (410)", Int64.Type}, {"Consulting & Accounting (412)", Int64.Type}, {"Dividend offset account to align actuals vs budget (501)", Int64.Type}, {"Dividend Paid (500)", Int64.Type}, {"Donations (419)", Int64.Type}, {"Entertainment (420)", Int64.Type}, {"Equipment Expense (426)", Int64.Type}, {"Filing Fees (480)", Int64.Type}, {"Freight & Courier (425)", Int64.Type}, {"FX Gain or Loss (999)", Int64.Type}, {"General Expenses (429)", Int64.Type}, {"Income Tax Expense (950)", type number}, {"Insurance (433)", type number}, {"Interest Expense (437)", type number}, {"Legal expenses (441)", Int64.Type}, {"Light, Power, Heating (445)", Int64.Type}, {"Marketing Expenses (447)", Int64.Type}, {"Motor Vehicle Expenses (449)", type number}, {"Motor Vehicle Fuel (450)", type number}, {"New Office Costs (452)", Int64.Type}, {"Office Expenses (453)", type number}, {"Outgoings (468)", Int64.Type}, {"Printing & Stationery (461)", Int64.Type}, {"Realised Currency Gains (499)", Int64.Type}, {"Recruitment Costs (470)", Int64.Type}, {"Registrations (464)", Int64.Type}, {"Rent (469)", Int64.Type}, {"Repairs and Maintenance (473)", Int64.Type}, {"Subscriptions (485)", Int64.Type}, {"Superannuation (478)", type number}, {"Telephone & Internet (489)", Int64.Type}, {"Training (474)", type number}, {"Travel - International (494)", Int64.Type}, {"Travel - National (493)", Int64.Type}, {"Uniforms (495)", Int64.Type}, {"Unrealised Currency Gains (498)", Int64.Type}, {"Wages and Salaries (477)", Int64.Type}, {"Website Expenses (475)", Int64.Type}, {"Total Operating Expenses", type number}, {"Directors Drawings (418)", Int64.Type}, {"Total Overheads", Int64.Type}, {"Amortisation (401)", type number}, {"Depreciation (416)", Int64.Type}, {"Total Depreciation", type number}, {"Total Expenses", type number}, {"Net Profit", type number}}),
#"Renamed Columns" = Table.RenameColumns(#"Changed Type",{{"Account", "Date"}})
in
#"Renamed Columns"
Still can't get it. I have tried to get the max value but just can't figure it out. It doesn't seem to let me select two fields to be able to get the max.
I want to get the max of consulting revenue from transposed data and consulting revenue (202) from budget. Once I have this, I understand how I can get that in to the gauge field.
I then want to create the gauge colour field but again, don't know how to do that.
If you need more data than above, please let me know what you need me to send and how best to send it.
Thanks. Nikki
- v-xiaotang4 years agoCommunity Support
Hi NikkiSavage
Thanks for your reply.
Yes, we need more data than above, could you share the .pbix file? or some sample data if they can fully illustrate your question. Besides, you can read this article, follow the steps in the article to describe your problem
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.