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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Anonymous
Not applicable

Calculate value with multiple months

Hello all,

 

I am very new to power BI and stuck on this. Seems very simple but can't figure it out. 

 

When i select multiple months, I would like the Rev targets value to add together.

 

Screenshot 2024-05-31 125340.jpg

 

Exmaple:

 

Rev target                        Month

2                                    1/1/2024

2                                    2/1/2024

3                                    3/1/2024

 

So when I select 1/1/2024 and 2/1/2024, the rev target value will change to 4. If i add 3/1/2024 the rev target will be 7.

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @Anonymous 
This is how it works as a default if the Rev target  data type is a number

Ritaf1983_0-1717219776292.pngRitaf1983_1-1717219807429.png

Ritaf1983_2-1717219821244.png

If the data type is correct and it is still isn't working, please attach a link to your pbix .

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

Ensure that you create a Calendar Table with calculated column formulas for Year, Month name and Month number.  Sort the Month name column by the Month number column.  Create a relationship (Many to One and Single) from the Date column in your Fact table to the Date column in the Calendar Table.  To your slicer, drag Year and Month name from the Calendar Table.  Write this measure

Total = sum(Data[Amount])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ritaf1983
Super User
Super User

Hi @Anonymous 
This is how it works as a default if the Rev target  data type is a number

Ritaf1983_0-1717219776292.pngRitaf1983_1-1717219807429.png

Ritaf1983_2-1717219821244.png

If the data type is correct and it is still isn't working, please attach a link to your pbix .

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Kudoed Authors