Ashish Pipaliya
Ashish Pipaliya

Reputation: 123

How to Create a new Calculated Card Visualization that displays a value derived from these two cards in my dashboard in Power BI?

How to Create a Calculated Card Visualization in Power BI? I have two card visualizations in Power BI, and I want to create a third card visualization that displays a value derived from these two cards. Additionally, the value in the new card should dynamically update based on slicer selections. How can I achieve this?

Details:

Card 1: Displays a numerical value from my dataset.

Card 2: Displays another numerical value from my dataset.

New Card: This should display a calculation based on the values in Card 1 and Card 2 (e.g., the sum, difference, ratio, etc.).

I want the value of the new card to update automatically when a slicer is used to filter the data.

Using a card visualization is not essential; I just want to display a number. However, I prefer a card visualization because it looks better on the dashboard.

What I’ve Tried:

I attempted to use DAX formulas to create a new measure, but I’m not sure how to reference the values from the existing cards or ensure that the new card updates dynamically with slicer selections.

Example:

If Card 1 shows the total sales and Card 2 shows the total cost, I want the new card to display the profit (Total Sales - Total Cost). The profit should update when I apply a date range filter using a slicer.

Thank you.

Upvotes: 0

Views: 716

Answers (1)

mkRabbani
mkRabbani

Reputation: 16908

Create 3 measures as below-

Card 1:

totalSales = sum(yourTableName[yourSalesColumnName])

Card 2:

totalCost = sum(yourTableName[yourCostColumnName])

Card 3:

totalProfit = [totalSales] - [totalCost]

Upvotes: 0

Related Questions