Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hi all,
I have a table like this:
| Materialnumber | Date | Value |
| 100 | 01.01.2021 | 100 |
| 100 | 02.01.2021 | 100 |
| 100 | 03.01.2021 | 200 |
The goal is that the user can select 2 dates and PowerBi show up the difference between the entries per Materialnumber.
In example, the user choose Date1 "01.01.2021" and Date2 "03.01.2021" and the result should be:
| Materialnumber |
| 100 |
How can I realize this issue, any ideas?
Thanks for your help
Solved! Go to Solution.
@flownfluid , assuming dates are selected in a single slicer
measure =
Var _Min = MINX(allselected('Date'), 'Date'[Date]) //date table assumed
Var _Max = MAXX(allselected('Date'), 'Date'[Date])
return CALCULATE(SUM(Table1[Value]), filter(Table1, Table1[date]=_max)) -CALCULATE(SUM(Table1[Value]), filter(Table1, Table1[date]=_min))
Hi, @flownfluid
If I understand your needs, you can do this:
1. Create a single date list as slicer.
Like this:
Table 2 = DISTINCT('Table'[Date])
2. Create a measure to show the difference.
Like this:
Measure =
var a=MINX( DISTINCT('Table 2'[Date]),[Date])
var b=MAXX( DISTINCT('Table 2'[Date]),[Date])
var c=SUMX(FILTER(ALL('Table'),[Date]=a&&[Materialnumber]=SELECTEDVALUE('Table'[Materialnumber])),[Value])
var d=SUMX(FILTER(ALL('Table'),[Date]=b&&[Materialnumber]=SELECTEDVALUE('Table'[Materialnumber])),[Value])
return d-c
Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please upload some insensitive data samples and expected output.
Best Regards,
Community Support Team _ Janey
@flownfluid , assuming dates are selected in a single slicer
measure =
Var _Min = MINX(allselected('Date'), 'Date'[Date]) //date table assumed
Var _Max = MAXX(allselected('Date'), 'Date'[Date])
return CALCULATE(SUM(Table1[Value]), filter(Table1, Table1[date]=_max)) -CALCULATE(SUM(Table1[Value]), filter(Table1, Table1[date]=_min))
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 22 | |
| 22 | |
| 18 | |
| 16 | |
| 13 |
| User | Count |
|---|---|
| 63 | |
| 41 | |
| 40 | |
| 39 | |
| 38 |