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!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live 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
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 63 | |
| 43 | |
| 31 | |
| 27 | |
| 23 |
| User | Count |
|---|---|
| 134 | |
| 113 | |
| 58 | |
| 39 | |
| 35 |