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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
inescosta
Advocate II
Advocate II

Related problem

 

imagem.png

 

I am trying to use data from table ProjetoSegmento(2) and ProjetoSegmentoOrcamento in table ProjectoSegmento using function Related. But it doesn't work.

But I don't understand why since they are both related to it.

 

 

 

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

That is going to depend on a whole raft of things like what specifically you are trying to accomplish. Some things that you can try, you can check out USERELATIONSHIP and perhaps you are running into a scenario where the cross-filtering is causing you issues, you could try to make the relationships filter in only one direction. If you could provide some data (text) and specifically what you are trying to achieve, that would help tremendously.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

 

 

imagem.png

 

So tabele ProjetoSegmento(2) is a duplicate of ProjetoSegmento because I need to create a column  with all the dates between two sets of dates related to the beginning and end of a project. So I used Number.from[stardate]..Number.from[enddate] and created column [diasdeprojeto], since each project has several days I them had to expand the list and got a table with ProjetoSegmentoID repetead. and know I need to get the column [quant] in table ProjetoSegmento(2), using the relationship [id] in table projectoSegmento(2) (which is repeat) with [ProjectSegmentoId] in table ProjetoSegmentoOrcamento. Both tables are linked to ProjetosSegmento which has the primary informations.

 

Was I clear?

Hi @inescosta,

Thanks for your detail description. If there is one to many relation table A(one) and table B(many), you only use related function in table B which have multiple values. If you used related in table A direction, it will return error. Because it doesn’t verify which one should be return.

>> So tabele ProjetoSegmento(2) is a duplicate of ProjetoSegmento because I need to create a column  with all the dates between two sets of dates related to the beginning and end of a project. So I used Number.from[stardate]..Number.from[enddate] and created column [diasdeprojeto], since each project has several days I them had to expand the list and got a table with ProjetoSegmentoID repetead.

You should count the days in ‘ProjetoSegmentoOrcamento’ table for each ID. Then summarize it using appropriate function based on your requirement in ‘ProjetoSegmento(2)’ table. Finally, you can used related function in ‘ProjetoSegmento’ table to get the result.

If this is not what you want, please share the sample data and expected result for further analysis.

Best Regards,
Angelia

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.