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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
UdayReddy511
Frequent Visitor

YTD by Dynamic Category except Fiscal Year Period

Hi Team
I have scenario

I have fiscal year period table which starts from Sep-Aug

Now i want to calculate Revenue YTD by Period including random columns from multiple dimension tables 

Like i will take add Dim1_Status from Dimension1 or another column (Dim2_Status) from another dimesnion table. But i am facing issue with the ouput
(For validation purpose i am including random columns in below output but we need to have desired output even if we exclude that columns)
For your reference i am sending sample out along with desired Output (Lastcolumn)

UdayReddy511_0-1674634409106.png

I have tried below appraoches but i dint worked
Rev_YTD_Test1=

Var YTD_ALL=CALCULATE([Revenue YTD],ALLSELECTED(),VALUES('Fiscal Period'[Fiscal Date]))
Var YTD_Result= IF(ISBLANK([Revenue]), BLANK (), YTD_ALL )
Return YTD_Result

Rev_YTD_Test2=

Var YTD_ALL=CALCULATE([Revenue YTD],ALLSELECTED(),VALUES('Fiscal Period'[Fiscal Date]))
Var YTD_Result=IF([Gross Profit]=BLANK()&&[Gross Profit]=[Gross Profit YTD],BLANK(),YTD_ALL)
Return YTD_Result

Can you help me
Thanks inadvance
4 REPLIES 4
UdayReddy511
Frequent Visitor

I have Fiscal Year Table and i have created below formula and it is working fine.
TOTALYTD ([Revenue],'Fiscal Period'[Fiscal Date],ALL ( 'Fiscal Period' ),"31/8")
But when i am inserting any categorical column (eg BL Status) it is splitting but i need to have YTD based on date
For eg:
In the FY20P07 it supposed the status sholuld be "Closed" but i am getting "OPEN" and "CLOSED" and YTD is wrong

Still looking for solution.

amitchandak
Super User
Super User

@UdayReddy511 , Try time intelligence with date table

 

YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"08/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"08/31"))

 

 

Time Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

I have already output with Fiscal Year YTD but when i include DimStatus columns my YTD is getting split..It suppose to be one..For eg in FY20P07 it suppose to be "Closed" but i am getting Open and Closed

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.