Forum Discussion
How to create a 0...1/Many relationship
Hi everyone,
I have this model:
A request can have 0 or 1 payments;
Dimension_time is related to requests;
Dimension_time (2) is related to payments.
In the report, I just want to see request_id, creation date of the request (dimension_time -> date) and, if exists, payment date (dimension_date 2 -> date)..
This is the result I see before I insert payment date in the report
When I add payment date all published requests disappear:
What I expected instead is seeing all requests with payment date NULL... What do I have to change?
Thank you
10 Replies
- aj1973Community Champion
Hi Simone2004
You can't just insert the Payement date in the visual, you need to create a measure that will bring and insert that date into the visual. Use CALCULATE(SELECTEDVALUE( the date here), USERELATIONSHIP(column date from dimension_time , column payement date key from payments fact table)
- Simone2004Helper I
where do I have to create the measure column? In the requests fact table? Dont I have to use a relationship between requests and payments by request_id?
- rouriqueRegular Visitor
Research how to create power BI measures.
the code is at the top of the screen and the measurements in the right corner.
- Simone2004Helper I
I cannot believe, a thing simple like this is so difficult in power bi 😥
- v-kkf-msftCommunity Support
Hi Simone2004 ,
I used the same model to create sample data, and I was able to get the payment date for all request_id.
You can see the difference between my model and yours. If possible, could you please share your PBIX file without sensitive data?
Best Regards,
Winniz