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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
kthakur
Helper I
Helper I

Month and Year metrics in same report

Hi All,

I need to display 5 metrics in a report where 3 metrics are fixed for different years 2016,2017 & 2018, other two metrics are calculated based on users month selection. In current situation when I select month then my metrics calculated on year is also getting changed. Is there way to restrict that and apply month selection only for two metrics?

Thanks
Krishna

3 REPLIES 3
v-jiascu-msft
Employee
Employee

Hi Krishna,

 

Could you please mark the proper answers as solutions?

 

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
themistoklis
Community Champion
Community Champion

@kthakur

 

You can also create an unrelated table which lists all available months. In this case, when you choose any value from this slicer, the objects won't be filtered by it. If you want the objects to be affected by the selction then you can specify it in the DAX formula using FILTER.

 

Selected_Months =
SELECTEDVALUE ( Table[Months] )


Measure =
CALCULATE (
    SUM ( Table[value] ),
    FILTER ( Table, Table[Months] = [Selected_Months] )
)

 

Anonymous
Not applicable

Hey, @kthakur could you try doing an ALL/ALLSELECTED calculation?

 

i.e. 2016 Metic = CALCULATION(SUM(ALL(Metric Value)), (Metric Value Year = '2016'))

 

     Month Metic = SUM(ALLSELECTED(Metric Value))

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors