The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi All,
I had a report that consists on 3 years data. I wanted to see if the same instruments has repair coming back each year for testing. I convert it to 3 table of each year. I setup the relation via serial no. I put in the serial and 1st year, the data will appear. I replace 1st year with 2nd year and the data will appear. However, once I put 1st and 2nd year data together, the data will go missing and I don't know why. Any help are welcome!
Hi @Anonymous ,
I guess it should be a referential integrity issue. This is a constraint between two related tables. For two tables to establish a relationship, the foreign key value for each record in the dimension table must exist in the primary table. In short, each row of the fact table must have a corresponding record in the dimension table.
When your serial number represents the time of the first year, there will be no value matching it in the second year, so a blank value will be automatically filled in this row, that's why it doesn't seem to appear.
Attach the PBIX file for reference. Hope it helps.
If this doesn't work for you, please consider sharing more details about it. And it would be great if there was a sample file without any sensitive information here.
It makes it easier to give you a solution.
Best Regards,
Community Support Team_Gao
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
@Anonymous , Why do you need three tables? with the same table retained customer(you need a separate year table) approach in these blogs can work
//Date/Year table
This Year = CALCULATE(Count('Table'[instrument]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])))
Last Year = CALCULATE(Count('Table'[instrument]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])-1))
Countx(values('Table'[instrument]), if( not(isblank[this year])) && not(isblank[last year])) , [instrument], blank())
refer if needed
Customer Retention Part 1:
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/ba-p/1361529
Customer Retention Part 2: Period over Period Retention :https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-2-Period-over-Period-Retention/ba-p/1377458