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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
MRAMS
New Member

Formula Help

Hi all,

 

I am new to Power BI Desktop and have managed to do all other formula's except this one.  If someone could help it would be greatly appreciated. 

 

My formula in excel adds up all the values in column 1 if the name is the same in column 2 and returns the total of all rows in each row.  This then enables me to pick up the max unavailable days.

 

No matter what I try in Power BI I cannot get a formula to work.  I have tried doing it in the query, in the data table and as a measure, but nothing works.  Help please.

 

Thank you in advance.

 

Michelle

 

DNU – Unavailable Days MCRQ                 FE & Week Start Date MCRQ                      NEW Column
1                             KLA – 10/04/2023                                            3
1                             KLA – 10/04/2023                                            3
1                             KLA – 10/04/2023                                            3
1 ACCEPTED SOLUTION
v-xinruzhu-msft
Community Support
Community Support

Hi @MRAMS 

You can create a calculated column

Column = SUMX(FILTER('Table',[FE & Week Start Date MCRQ]=EARLIER('Table'[FE & Week Start Date MCRQ])),[DNU – Unavailable Days MCRQ])

Output

vxinruzhumsft_0-1701067228699.png

Best Regards!

Yolo Zhu

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

4 REPLIES 4
v-xinruzhu-msft
Community Support
Community Support

Hi @MRAMS 

You can create a calculated column

Column = SUMX(FILTER('Table',[FE & Week Start Date MCRQ]=EARLIER('Table'[FE & Week Start Date MCRQ])),[DNU – Unavailable Days MCRQ])

Output

vxinruzhumsft_0-1701067228699.png

Best Regards!

Yolo Zhu

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

 

Hi @v-xinruzhu-msft 

This formula has worked.  Thank you so much for your help.  

Thanks,

Michelle

 

Michelle

KNP
Super User
Super User

Hi Michelle,

 

Wouldn't you rather just calculate the 'Max Unavailable Days' as a measure or do you need this column for something else?

 

Some additional data with more combinations would be useful.

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

Hi @KNP 

Thank you for your help.

Thanks,

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.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors