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, new to powerbi, still having a play!
I have adhoc snapshots of data, all brought into the same table. This shows three snapshots, but there could be as many as 24 or 36.
SS Prod Total
100 A 15
100 B 6
100 C 7
101 A 12
101 B 6
101 C 8
102 A 11
102 B 6
102 C 8
I want to have a list where I can choose 101, 102, 103 and have a table which shows
101 102 Var
A 12 11 -1
B 6 6 0
C 8 8 0
or
100 102 Var
A 15 11 -4
B 6 6 0
C 7 8 1
I've simplied this massively, but basically I want to be able to bring in a colum of information from the data set and compare it side by side.
I've created a seperate table which has
SS Index
100 1
101 2
102 3
104 4
Solved! Go to Solution.
Hi @Anonymous,
You can try to use below formula to calculate difference between selected column items:
Measure =
VAR _min =
MINX ( VALUES ( Table3[SS] ), [SS] )
VAR _max =
MAXX ( VALUES ( Table3[SS] ), [SS] )
RETURN
IF (
HASONEVALUE ( Table3[SS] ),
CALCULATE ( SUM ( Table3[Total] ), VALUES ( Table3[Prod] ) ),
IF (
COUNTROWS ( VALUES ( Table3[SS] ) ) = 2,
CALCULATE ( SUM ( Table3[Total] ), Table3[SS] = _min )
- CALCULATE ( SUM ( Table3[Total] ), Table3[SS] = _max )
)
)
Regards,
Xiaoxin Sheng
Hi @Anonymous,
You can try to use below formula to calculate difference between selected column items:
Measure =
VAR _min =
MINX ( VALUES ( Table3[SS] ), [SS] )
VAR _max =
MAXX ( VALUES ( Table3[SS] ), [SS] )
RETURN
IF (
HASONEVALUE ( Table3[SS] ),
CALCULATE ( SUM ( Table3[Total] ), VALUES ( Table3[Prod] ) ),
IF (
COUNTROWS ( VALUES ( Table3[SS] ) ) = 2,
CALCULATE ( SUM ( Table3[Total] ), Table3[SS] = _min )
- CALCULATE ( SUM ( Table3[Total] ), Table3[SS] = _max )
)
)
Regards,
Xiaoxin Sheng
Thanks v-shex-msft, worked a treat!
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 |
|---|---|
| 45 | |
| 38 | |
| 34 | |
| 21 | |
| 17 |
| User | Count |
|---|---|
| 66 | |
| 65 | |
| 31 | |
| 26 | |
| 26 |