Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi All,
I have two tables Data & Sequence Dim. Both tables are linked on Sequence. In reality it's many to one join, but it's basic sample so you can see one to one relation.
Data table:
Sequence Dim table:
Requirement:
When I select any number from Sequence field in Sequence Dim table, I need to check that Sequence field in Data table and pick all the number less than or equal to selected number for each Type and apply sum over that Value.
for eg. When I select number 5 from Seqence in Sequence Dim table, I need to show below output
| Type | Value | check <=5 Sequence in data table |
| a | 45 | 1+2+4 |
| b | 95 | 3+4+5 |
| c | 215 | 2+3+4 |
When I select number 3 from Seqence in Sequence Dim table, I need to show below output
| Type | Value | check <=3 Sequence in data table |
| a | 20 | 1+2 |
| b | 40 | 3 |
| c | 125 | 2+3 |
Similarly, user can select any number and dynamically report should reflect the values based on selection
Note: I don't want to break or disconnect relationship between the table.
Solved! Go to Solution.
@rob_vander If I understood it correctly you can try below DAX
sum of value =
VAR selected_sequence = SELECTEDVALUE('Sequence Dim'[Sequence])
VAR sum_value = CALCULATE(SUM(Data[Value]),
REMOVEFILTERS('Sequence Dim'),
KEEPFILTERS(Data[Sequence]<= selected_sequence))
RETURN sum_value
@rob_vander If I understood it correctly you can try below DAX
sum of value =
VAR selected_sequence = SELECTEDVALUE('Sequence Dim'[Sequence])
VAR sum_value = CALCULATE(SUM(Data[Value]),
REMOVEFILTERS('Sequence Dim'),
KEEPFILTERS(Data[Sequence]<= selected_sequence))
RETURN sum_value
Hi Kushal,
I have Fiscal Year and Fiscal Week column, and If I select any fiscal week from slicer then it give me sum from First fiscal week to selected week on slicer. So, your trick worked for me. But I also want to get same data for last year. Can you help me with that?
For example, In slicer we select Fiscal Year 2024 Week 5, then based on your DAX code I got the sum of sales for Fiscal week 1 to Fiscal week 5. And I want to compare this data with sum of sales of Fiscal year 2023 from Week 1 to 5.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 17 | |
| 9 | |
| 8 | |
| 7 |