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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
macemit
Frequent Visitor

Calculation Help with growing column

Hi,

 

Another calculation quandry.  It'll help if you see a sample first:

Release Date:   
May-18   
 Months Since Release (M)Fails (F)M x F
(May)51260
(June)41560
(July)32266
(August)236
(September,now)12525
    
   217


It is currently Sept, a product was released in May. That is a 5 month span. Each month since release must be multiplied by failures from that month (counted rows from our database). The example above explains it best. Table can grow indefinitely (in Sept 2019, it'd be a 17 month span, etc..)

 

The '217' is the sum of the right hand column. That is the only number I'm interested in. In fact, the fails (middle column) do not even need to be visible as distinct numbers, they can be summed to give a single number (77 in this case) if that would make calculating easier. I am hoping that this calculation can possibly be acheived through a single 'function', or measure without resorting to a new, growing table. 

 

I have to do this for multiple products, so obviously the release month will usually vary.

Thanks.

4 REPLIES 4
v-frfei-msft
Community Support
Community Support

Hi @macemit,

 

I made one sample for your reference. If it doesn't meet your requirement, kindly share your sample data or pbix to me.

 

1. Enter the sample data and create a calculated column in the table.

 

Month = FORMAT(RELAEASE[date],"mmmm")

2. Create the measures as below.

 

Months Since Release = DATEDIFF(MAX(RELAEASE[date]),TODAY(),MONTH)+1
M = [Months Since Release]*SUM(RELAEASE[Fail])
M x F = SUMX(RELAEASE,[M])

Calculation Help with growing column.PNG

 

For more details, please check the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Hi @macemit,

 

Does that make sense? If so, kindly mark my answer as a solution to close the case.

 

Regards,
Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
PattemManohar
Community Champion
Community Champion

Give a try with this please...

 

GrandTotal = SUMX(MonthsFails,MonthsFails[Months Since Release (M)]*MonthsFails[Fails (F)])





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




Thanks. That helps in part. However, is there a method of deriving the months since release without resorting to its own column? Or resorting to columns at all. Ideally, I'd like to have only 2 variables: the release month and total failures. Surely there is a formula that will not require a new table or column.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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