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
jfreyes
Regular Visitor

Rollup value for groups of text

Hi,

I've tried to find a way to solve the following without success.

 

I need to calculate rollup values for any given 4 qtr period. Periods are formated in text (e.g. 2019-1, 2019-2..). Grouping isn't an option since Powerbi only allows to use values only in one group, thus the 4 quarter rolloup would not be feasible.

 

This is a visual sample of the table:

 

Period        Value

2019-2      $5

2019-2      $35

2019-1      $13

2018-3      $22

2018-4      $17

2018-4      $3

2018-4      $9

 

Where the 4qtr period ending in 2019-2 would be = the sum value of 2019-2+ sum value of 2019-1 + sum value of 2018-4+ sum value of 2018-3.

 

Any insight will be appreciated.

 

Jose

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @jfreyes ,

 

This is my PBIX file

quarter.PNG

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Icey
Community Support
Community Support

Hi @jfreyes ,

 

This is my PBIX file

quarter.PNG

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

natabird3
Continued Contributor
Continued Contributor

As far as i understood, this is what you try to achieve:

 
Create a measure and use this dax code:
Value average per Period =
SUMX(
    KEEPFILTERS(VALUES('Table'[Period       ])),
    CALCULATE(SUM('Table'[Value]))
)
 
Capture.JPG

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.