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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
I currently am working on a dashboard where i need a chart to show the difference in time between multiple months (see above).
I have created a column using the following expression to get the difference between the row values in the AverageTimeTakenInMSPerSearch.
Difference = vwActivityLogSummarySearchStats[AverageTimeTakenInMSPerSearch] - IF(
vwActivityLogSummarySearchStats[AverageTimeTakenInMSPerSearch] = 0,
vwActivityLogSummarySearchStats[AverageTimeTakenInMSPerSearch],
LOOKUPVALUE(
vwActivityLogSummarySearchStats[AverageTimeTakenInMSPerSearch],
vwActivityLogSummarySearchStats[Index],
vwActivityLogSummarySearchStats[Index]-1)
)
However on the dashboard if i select February 2016 vs February 2017 i get the difference values
February 2016 : -8.08938476346708
February 2017 : 1.79808856418784
Showing the difference as 1.7 when this is incorrect, is there a way to get this to show the correct difference based on my selection.
Thanks
Tom
Solved! Go to Solution.
Hi @TMAUND123,
If I understand you correctly, you should be able to use the formula below to create a new measure to Dynamically Calculating Difference between two rows based on filter selected. ![]()
Difference =
VAR minIndex =
MIN ( vwActivityLogSummarySearchStats[Index] )
VAR maxIndex =
MAX ( vwActivityLogSummarySearchStats[Index] )
RETURN
CALCULATE (
SUM ( vwActivityLogSummarySearchStats[AverageTimeTakenInMSPerSearch] ),
vwActivityLogSummarySearchStats[Index] = minIndex
)
- CALCULATE (
SUM ( vwActivityLogSummarySearchStats[AverageTimeTakenInMSPerSearch] ),
vwActivityLogSummarySearchStats[Index] = maxIndex
)
Regards
Hi @TMAUND123,
If I understand you correctly, you should be able to use the formula below to create a new measure to Dynamically Calculating Difference between two rows based on filter selected. ![]()
Difference =
VAR minIndex =
MIN ( vwActivityLogSummarySearchStats[Index] )
VAR maxIndex =
MAX ( vwActivityLogSummarySearchStats[Index] )
RETURN
CALCULATE (
SUM ( vwActivityLogSummarySearchStats[AverageTimeTakenInMSPerSearch] ),
vwActivityLogSummarySearchStats[Index] = minIndex
)
- CALCULATE (
SUM ( vwActivityLogSummarySearchStats[AverageTimeTakenInMSPerSearch] ),
vwActivityLogSummarySearchStats[Index] = maxIndex
)
Regards
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 53 | |
| 48 | |
| 35 | |
| 14 | |
| 14 |
| User | Count |
|---|---|
| 93 | |
| 79 | |
| 37 | |
| 27 | |
| 25 |