Forum Discussion
Append table kpi's
- 1 year ago
Hi Alex1960ad ,
What specific metrics or columns (e.g., TOTAL_REVENUE, TOTAL_EXPENSES, etc.) do you want to compare between the years?
Hi Alex1960ad ,
Thanks for reaching out to the Microsoft Fabric Community forum.
lbendlin , Thank you for the prompt response!
1. First, ensure you have a column or measure to compare 2023 with 2022 data.
2. Use the following DAX to create the KPI column that includes the * symbol or any desired character:
KPI =
IF (
Sheet1[2023] > Sheet1[2022],
"@", -- Displays the dot if 2023 > 2022
"1" -- Blank if condition is false
)
NOTE : Replace Table names, etc., with the actual table names, and with the relevant column names.
3. Apply Conditional Formatting :
- Select the Table visual.
- Click on the KPI column header dropdown >> Conditinal Formatiing >> Icons.
The desired output after appending the tables is shown below:
If this post was helpful, please consider marking Accept as solution to assist other members in finding it more easily.
If you continue to face issues, feel free to reach out to us for further assistance!
Thank you Abdul for responding. I dont understand your first comment "First, ensure you have a column or measure to compare 2023 with 2022 data". As my example is a appended table made from two tables, the "Year" field column in the appended table is stacked on eacher other in the same column, so I dont see how I can compare one column with itself? I have Year column having 2500 "2023" entries then followed by 2500 "2020" directly underneath.
- v-aatheeque1 year agoCommunity Support
Hi Alex1960ad ,
Let me clarify my earlier comment and provide detailed steps to help you compare 2023 data with 2022 data in your scenario:
-
Calculated Column for Year Comparison:
In my scenario, I created a calculated column to compare data for 2023 with 2022. This allows you to create year-specific measures or calculations in your model. -
How to Compare Years in a Single Column (Your Scenario):
Since your "Year" column contains all years stacked within the same column (e.g., 2500 entries for 2023 followed by 2500 entries for 2022), you can follow these steps in Power BI to achieve the comparison:Steps:
- Step 1: Load both tables into Power BI. Navigate to Transform Data to open Power Query.
- Step 2: Use Append Queries:
- If you want to create a new combined table, select Append Queries as New.
- Alternatively, you can append one table into an existing table.
- Select both tables to combine them.
- Step 3: Once the tables are appended, click Close & Apply to load the combined data back into Power BI.
-
Comparing the Data:
Once your data is appended into a single table, you can create measures in Power BI to compare values for 2023 and 2022. For instance, you can filter the data by year using DAX formulas to compute differences or comparisons between the two years.
I hope this resolves your query! If this solution works for you, kindly click Accept Answer and select Yes for "Was this answer helpful?" Feel free to let me know if you have further questions!
- v-aatheeque1 year agoCommunity Support
Hi Alex1960ad ,
we haven't heard back from you regarding our last response and wanted to check if your issue has been resolved.
If our response addressed your query, please mark it as Accept Answer and click Yes if you found it helpful.
Should you have any further questions, feel free to reach out.
Thank you for being a part of the Microsoft Fabric Community Forum!- v-aatheeque1 year agoCommunity Support
Hi @Alex1960ad ,
we haven't heard back from you regarding our last response and wanted to check if your issue has been resolved.
If our response addressed your query, please mark it as Accept Answer and click Yes if you found it helpful.
Should you have any further questions, feel free to reach out.
Thank you for being a part of the Microsoft Fabric Community Forum
-