Reply
kalo1314
Regular Visitor
Partially syndicated - Outbound

Slicer sometimes does not work

Hi all,

 

I have encountered a technical problem and need for a kind help. 

 

I am trying to make a formula for a 12-month cumulative calculation.  I have made a date table to connect two fact tables. I also create a 12-month slicer table to connect to the date table in a bidirectional way to make the slicer effective. However, the similar calculation is good on one table, but the other one have some duplicated values, showing that the slicer does not work well.  Please see below:

 

kalo1314_0-1714114618278.pngkalo1314_1-1714114711216.png

 

 

 

The good result of the calculation can be seen below:

ComFATLTIroll = CALCULATE(SUM('Cority Data'[FATLTI Count]), REMOVEFILTERS('Date Period'[Period]),DATESINPERIOD('Calendar'[CalDate], LASTDATE('Calendar'[CalDate]), -12,MONTH))

 
The bad result of the calculation is:
ComManhoursRoll = CALCULATE(SUM('CorityMHL'[Manhours]), REMOVEFILTERS('Date Period'[Period]),DATESINPERIOD('Calendar'[CalDate], LASTDATE('Calendar'[CalDate]),-12,MONTH))
 
The reason I use REMOVEFILTERS in the calculation is that I need the result unchanged when the month is rolling.  The period slicer is just like below:
 
kalo1314_0-1714117454241.pngkalo1314_1-1714117526912.png

 

 

 

I have checked the data types are all correct.  Can anyone give a hand to solve my problem?

1 ACCEPTED SOLUTION
Wilson_
Super User
Super User

Syndicated - Outbound

Hi kalo,

 

This looks like a modeling problem. You should not need a Date Period table; any additional dimensional data should be in your Calendar table. Also, it looks like you have a table that filters your Date Period table, which is almost certainly incorrect modeling.

 

Hard to give much more feedback than that given the limited view of the model itself. I just don't think this is primarily a DAX problem.


----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)

 

P.S. Need a more in-depth consultation for your Power BI data modeling or DAX issues? Feel free to hire me on Upwork or DM me directly on here! I would love to clear up your Power BI headaches.




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

Proud to be a Super User!





View solution in original post

1 REPLY 1
Wilson_
Super User
Super User

Syndicated - Outbound

Hi kalo,

 

This looks like a modeling problem. You should not need a Date Period table; any additional dimensional data should be in your Calendar table. Also, it looks like you have a table that filters your Date Period table, which is almost certainly incorrect modeling.

 

Hard to give much more feedback than that given the limited view of the model itself. I just don't think this is primarily a DAX problem.


----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)

 

P.S. Need a more in-depth consultation for your Power BI data modeling or DAX issues? Feel free to hire me on Upwork or DM me directly on here! I would love to clear up your Power BI headaches.




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

Proud to be a Super User!





avatar user

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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)