Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jav226
Frequent Visitor

Sum total value based on period date of another table

All,

 

Currently I have a tabled called "Progress" with a "Period" column and calculated measure called "Cumm Actual (%)". 

 

I want Power BI to sum up the "Cumm Actual (%)" in "Progress" table based on the "Period" set in another table called "MyCurrent". 

 

Below is the DAX  but it returned error. Appreciate if anyone can guide me. tq.

 

Cumm Actual (%) by Period =
CALCULATE (
SUMX(Progress,[Cumm Actual (%)],
FILTER (Progress, Progress[Period]=MAX(MyCurrent[Period])
)))
4 REPLIES 4
parry2k
Super User
Super User

@jav226 can you shre sample data and expected result.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Here you go:-

 

Progress Fact Table

PeriodCumm Actual (%)
1 January, 20198%
1 February, 201910%
1 March, 201915%

 

MyCurrent Table

Period
1 January, 2019

1 February, 2019

 

Expected result:

10%

@jav226 still not very clear what you are asking, read this post to get your answer quickly

 

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi @parry2k , I've summarized my query as following. Hope it is clear for you to understand. 

 

Currently I have a fact table called "Progress" with a "Period" column and calculated measure called "Cumm Actual (%)". 

 

Progress Fact Table

Period

Cumm Actual (%)

1 January, 2019

8%

1 February, 2019

10%

1 March, 2019

15%

 

I want Power BI to show the "Cumm Actual (%)" in "Progress" fact table based on the maximum "Period" set in another table called "MyCurrent". 

 

MyCurrent Table

Period

1 January, 2019

1 February, 2019

 

Since the maximum Period is 1 February 2019, the Expected result: 10%

 

Below is the DAX  but it returned error:-

 

Cumm Actual (%) by Period =

CALCULATE (

SUMX(Progress,[Cumm Actual (%)],

FILTER (Progress, Progress[Period]=MAX(MyCurrent[Period])

)))

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors