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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
analyst312
Frequent Visitor

Need help with HASONEFILTER since the original measure isnt working

Working on a measure that calculated the month/month difference. I was able to pull one together that works but now the totals dont total correctly. Ive ran into this problem before but can never get the HASONEFILTER correct.

 

Here is the first measure:

 

Mo/Mo Diff =IF(CALCULATE(
    [Sum of Census],
    PARALLELPERIOD(
        'Calendar'[Dates],
        -1,
        MONTH)
) = BLANK(),

BLANK(),

[Sum of Census]-CALCULATE(
    [Sum of Census],
    PARALLELPERIOD(
        'Calendar'[Dates],
        -1,
        MONTH)
))

 

Second measure with the HASONEFILTER

 

 

Mo/Mo Diff FIX =IF(HASONEFILTER('Calendar'[Month]),
[Mo/Mo Diff],
SUMX(VALUES('Calendar'[Month]),
[Mo/Mo Diff]))

 

 

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

Hi @analyst312 ,

 

Has your problem been solved, if so, please consider Accept a correct reply as the solution or share your own solution to help others find it.

Best Regards
Lucien

amitchandak
Super User
Super User

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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