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

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 @brollie 
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.

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 @brollie 
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.

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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