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
DM_EU
Helper I
Helper I

Compare more than 2 periods

Hello, 

 

My client would like to compare the data on different periods like in the screenshot below but it does not work for me (I should see data on period 4). 

DM_EU_0-1691045734860.png

 

Here are my measures :

 

Spots period 1 = CALCULATE(
    SUM(BI_PRE_TELECAST_VIEW[ElementDuration]),
    USERELATIONSHIP('Period 1'[Date], BI_PRE_TELECAST_VIEW[BroadcastingDate]), REMOVEFILTERS('Dim Date'),REMOVEFILTERS('Period 2'), REMOVEFILTERS('Period 3'), REMOVEFILTERS('Period 4'))
 
Spots period 2 = CALCULATE(
    SUM(BI_PRE_TELECAST_VIEW[ElementDuration]),
    USERELATIONSHIP('Period 2'[Date], BI_PRE_TELECAST_VIEW[BroadcastingDate]), REMOVEFILTERS('Dim Date'),REMOVEFILTERS('Period 1'), REMOVEFILTERS('Period 3'), REMOVEFILTERS('Period 4'))
 
Spots period 3 = CALCULATE(
    SUM(BI_PRE_TELECAST_VIEW[ElementDuration]),
    USERELATIONSHIP('Period 3'[Date], BI_PRE_TELECAST_VIEW[BroadcastingDate]),  REMOVEFILTERS('Dim Date'),REMOVEFILTERS('Period 1'), REMOVEFILTERS('Period 2'), REMOVEFILTERS('Period 4'))
 
Spots period 4 = CALCULATE(
    SUM(BI_PRE_TELECAST_VIEW[ElementDuration]),
    USERELATIONSHIP('Period 4'[Date], BI_PRE_TELECAST_VIEW[BroadcastingDate]), REMOVEFILTERS('Period 1'), REMOVEFILTERS('Period 2'), REMOVEFILTERS('Period 3'))


And my parameter that I put on Y axe : 

 

Parameter Periods = {
    ("Period 1", NAMEOF('Measure table'[Spots period 1]), 0),
    ("Period 2", NAMEOF('Measure table'[Spots period 2]), 1),
    ("Period 3", NAMEOF('Measure table'[Spots period 3]), 2),
    ("Period 4", NAMEOF('Measure table'[Spots period 4]), 3)
}
 
And here are the filters applied when I hoover the filter icon: 
DM_EU_0-1691046072810.png

 

And here is the data model behind (only the dates tables layout) :

DM_EU_0-1691046293463.png

 

 

Is this scenario at least possible in Power BI ? If yes, where I am getting wrong ?

 

Thank you!

Best regards

1 REPLY 1
MFelix
Super User
Super User

Hi @DM_EU ,

 

Looking at the model since the tables have inactive relationships there is no need for you to remove the filters from the other tables, since the calculation will go trough the active relationship.

 

But without any data is difficult to pinpoint the issue.

 

Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.

If the information is sensitive please share it trough private message.

 

If you can also give an expected result would be great.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



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.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors