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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

FYTD measure not correct

Hi Community,

 

I am stuck with something probably quite simple, need your help to figure this out.  The FYTD totals are wrong for some months below: FY is from July to June

Capture_fytd.JPG

PBI link is : https://1drv.ms/u/s!Ag919_pO_UKrgQV6IfRLFFZluD2V?e=xnh2y2

 

TIA,

Meena

1 ACCEPTED SOLUTION
mahoneypat
Employee
Employee

Thanks for providing the pbix file.  Your measure is doing a distinctcount, so you must have had duplicates in those months that didn't get counted.  Please try this expression to get your desired result.

 

 

FYTD =
CALCULATE (
    SUMX (
        SUMMARIZE ( Datedim, Datedim[Year], Datedim[Month] ),
        CALCULATE ( DISTINCTCOUNT ( Data[p_id] ) )
    ),
    DATESYTD ( Datedim[Date], "30/6" )
)

 

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

2 REPLIES 2
mahoneypat
Employee
Employee

Thanks for providing the pbix file.  Your measure is doing a distinctcount, so you must have had duplicates in those months that didn't get counted.  Please try this expression to get your desired result.

 

 

FYTD =
CALCULATE (
    SUMX (
        SUMMARIZE ( Datedim, Datedim[Year], Datedim[Month] ),
        CALCULATE ( DISTINCTCOUNT ( Data[p_id] ) )
    ),
    DATESYTD ( Datedim[Date], "30/6" )
)

 

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

Thanks a lot @mahoneypat for your solution & explaination! Much appreciated😊

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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