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
topkapi
Frequent Visitor

YTD KPI with YTD Trend

Hi All,

here is a sample table. Having product with two different dates. Fact A & Fact B are the count of ProdID under each date. Fact is the difference of these two measures. I need to create KPI for Fact column to see the trend. I have a dim Date table as well. Need to join dimDate(date) with Period-A and Period-B to get trend line.

ProdIDPeriod-AFactA = count(ProdID) (for Period-A)Period-BFactB= count(ProdID) (for Period-B)Fact = count(FactA)-count(FactB)
4472212/7/197711/13/20181 
447231/1/100011/1/10001 
4472412/31/197711/1/10001 
447251/1/190011/1/19001 
4472612/7/197719/29/20181 
447271/1/190011/1/19001 
4472811/13/201811/10/20181 
447291/1/190011/1/19001 
4473012/7/197711/1/10001 
4473112/7/197711/1/10001 
447323/2/198711/1/20171 

 

Need to calcuate YTD KPI/ YTD Trend for Fact

(Filter conditions for Fact A <> 1/1/200, Filter condition for Fact B <> 1/1/200)

Thanks

1 ACCEPTED SOLUTION
v-jiascu-msft
Employee
Employee

Hi @topkapi,

 

The measure could be as follows. There should be two relationships.

Measure =
COUNT ( Table1[ProdID] )
    - CALCULATE (
        COUNT ( Table1[ProdID] ),
        USERELATIONSHIP ( 'Calendar'[Date], Table1[Period-B] )
    )

YTD_KPI_with_YTD_Trend

 

1. There is almost only one day for each year. Is YTD necessary?

2. What's "Fact A <> 1/1/200"? The "1/1/200"?

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-jiascu-msft
Employee
Employee

Hi @topkapi,

 

 

Could you please mark the proper answers as solutions?

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-jiascu-msft
Employee
Employee

Hi @topkapi,

 

The measure could be as follows. There should be two relationships.

Measure =
COUNT ( Table1[ProdID] )
    - CALCULATE (
        COUNT ( Table1[ProdID] ),
        USERELATIONSHIP ( 'Calendar'[Date], Table1[Period-B] )
    )

YTD_KPI_with_YTD_Trend

 

1. There is almost only one day for each year. Is YTD necessary?

2. What's "Fact A <> 1/1/200"? The "1/1/200"?

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.