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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
unknown_anony
Helper II
Helper II

Calculate measure from selected value from the slicer

Hello
I have few fact table(Revenue) which have the data for 2022 & 2023 as of now. I am creating a calendar table by below formula from the  facts table reveue

VAR _StartDate= FIRSTDATE(ALL('Revenue'[Invoicing Cycle]))

VAR _EndDate = LASTDATE(ALL('Revenue'[Invoicing Cycle]))                                                                  

RETURN

CALENDAR(_StartDate, _EndDate)

This is the below calculation i have to calculate

(Count of HeadCount numbers for Current period - count of HeadCount for Comparison period)

I will be having two slicer of current period and other one is comparison table .
When a user select in current period JUN 23 and Comparsion period MAR 22, the measure should calculte the count as per the above formula.
Next year when there will be the data for 2024 in the facts table , current period should be 2024 and the comparison period would be the rest of the year. It is a bit complicated situation. Will i have to create two separate calendar table  for current and comparison period or is there any better solution for this issue
How to solve this issue?
All suggestions are welcome

Thanks in advnace

1 ACCEPTED SOLUTION
miTutorials
Super User
Super User

I believe this is the solution you are looking for, let me know if this helps.

 

Compare any week/Year using 2 Slicers as input in PowerBI | MiTutorials - YouTube

View solution in original post

2 REPLIES 2
unknown_anony
Helper II
Helper II

It worked. thank you😊

miTutorials
Super User
Super User

I believe this is the solution you are looking for, let me know if this helps.

 

Compare any week/Year using 2 Slicers as input in PowerBI | MiTutorials - YouTube

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 MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.