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.
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.
ProdID | Period-A | FactA = count(ProdID) (for Period-A) | Period-B | FactB= count(ProdID) (for Period-B) | Fact = count(FactA)-count(FactB) |
44722 | 12/7/1977 | 1 | 1/13/2018 | 1 | |
44723 | 1/1/1000 | 1 | 1/1/1000 | 1 | |
44724 | 12/31/1977 | 1 | 1/1/1000 | 1 | |
44725 | 1/1/1900 | 1 | 1/1/1900 | 1 | |
44726 | 12/7/1977 | 1 | 9/29/2018 | 1 | |
44727 | 1/1/1900 | 1 | 1/1/1900 | 1 | |
44728 | 11/13/2018 | 1 | 1/10/2018 | 1 | |
44729 | 1/1/1900 | 1 | 1/1/1900 | 1 | |
44730 | 12/7/1977 | 1 | 1/1/1000 | 1 | |
44731 | 12/7/1977 | 1 | 1/1/1000 | 1 | |
44732 | 3/2/1987 | 1 | 1/1/2017 | 1 |
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
Solved! Go to Solution.
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] ) )
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
Hi @topkapi,
Could you please mark the proper answers as solutions?
Best Regards,
Dale
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] ) )
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |