Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hi,
I have a simple table with a date where the user will be able to select 2 dates and see the difference in Sum of Sales value between the selected dates as shown in the screen shot below.
User will be forced to select only 2 dates .
How do we achieve the difference instead of the sum of the selected 2 dates.
Attached is the link to the sample PBIX
https://www.dropbox.com/s/cy2buewqw5bkj9c/test.pbix?dl=0
Solved! Go to Solution.
https://www.dropbox.com/s/tct0pkypz9c7dgr/Test.pbix?dl=0
Diff measure : =
VAR _mindate =
CALCULATE ( MIN ( pbitest[rep_date] ), REMOVEFILTERS ( pbitest ) )
VAR _maxdate =
CALCULATE ( MAX ( pbitest[rep_date] ), REMOVEFILTERS ( pbitest ) )
VAR _diff =
CALCULATE ( SUM ( pbitest[atr] ), pbitest[rep_date] = _mindate )
- CALCULATE ( SUM ( pbitest[atr] ), pbitest[rep_date] = _maxdate )
RETURN
IF ( HASONEVALUE ( pbitest[rep_date] ), SUM ( pbitest[atr] ), _diff )
@Jihwan_Kim Thanks for the response.
I tried creating this measure and row level differences are correct but i still see issue at the grand total of the Total (Difference).
The total difference for the 2 selected dates must be 701 as per the below screenshot
(250-149+600) but the total shows -329 (Looks like this -329 is consistent no matter what dates we select)
https://www.dropbox.com/s/tct0pkypz9c7dgr/Test.pbix?dl=0
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 48 | |
| 40 | |
| 38 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 68 | |
| 65 | |
| 30 | |
| 26 | |
| 25 |