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! Get ahead of the game and start preparing now! Learn more
Hello Community Members,
I am struggeling with the following. I have a fairly simple table. No date dimensions unfortunately.
The rows contain a period number. Which can be from 1 - 12. I need a measure where the amount is summed.
It's conditional. Where period is 1 it should sum the amount where period is 1. If period is 2 it should Sum the amount of Period 2 - Period 1. If period is 3 it should Sum the amount of Period 3 - Sum of Period 2 etc.
I tried a lot with selected value and MAX, but it gave me the true / false error, so obviously i am doing something wrong.
Can anybody help me out?
See table below for reference.
Kind regards,
Jeroen
Solved! Go to Solution.
Hi @JeroenHD,
Can you please share some more detail about these table structures and relationship mapping?
How to Get Your Question Answered Quickly
You can extract the second table relationship key values based on the current selection, and use these extract values as conditions to filter on the first table.
formula =
VAR selected =
CALCULATETABLE ( VALUES ( Table2[key] ), ALLSELECTED ( Table2 ) )
RETURN
CALCULATE (
SUM ( Table1[Amount] ),
FILTER ( ALLSELECTED ( Table1 ), [key] IN selected )
)
Regareds,
Xiaoxin Sheng
Hi @JeroenHD,
Can you please share some more detail about these table structures and relationship mapping?
How to Get Your Question Answered Quickly
You can extract the second table relationship key values based on the current selection, and use these extract values as conditions to filter on the first table.
formula =
VAR selected =
CALCULATETABLE ( VALUES ( Table2[key] ), ALLSELECTED ( Table2 ) )
RETURN
CALCULATE (
SUM ( Table1[Amount] ),
FILTER ( ALLSELECTED ( Table1 ), [key] IN selected )
)
Regareds,
Xiaoxin Sheng
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 59 | |
| 46 | |
| 39 | |
| 38 | |
| 21 |
| User | Count |
|---|---|
| 176 | |
| 131 | |
| 118 | |
| 82 | |
| 54 |