Forum Discussion
if measure based on different row
Hello all, in need help with a measue
I am trying to get a number based on another number that is tied to a difffrent code that i have relatioships to.
I have a fact table that and created lots of measurments. all the measuments work if im doing a a relationship with many to many filtering both ways, exept this one.
If i change the relationship to filter the fact table to my data base the other measures do not give the correct number but this one does.
Which leaves me to belive i need to work on this measure.
here is how i have it written.
I figured it out what i was missing was the cross filter
Jainaba wrote:Hello all, in need help with a measue
I am trying to get a number based on another number that is tied to a difffrent code that i have relatioships to.
I have a fact table that and created lots of measurments. all the measuments work if im doing a a relationship with many to many filtering both ways, exept this one.
If i change the relationship to filter the fact table to my data base the other measures do not give the correct number but this one does.
Which leaves me to belive i need to work on this measure.
here is how i have it written.
#2 Hang Tend = if( CONTAINS('Fact Table','Fact Table'[Item Name],"tend"),CALCULATE(CALCULATE((sum(PDSSN[PIECE_CNT])/2),PDSSN[YLD_GROUP] in {2030})-CALCULATE(Sum(PDSSN[PIECE_CNT]),PDSSN[YLD_GROUP] in{4098})))I have been trying to figure this out for days any help on this would be greatly appricated!!!
2 Replies
- v-piga-msft
Resident Rockstar
Hi Jainaba ,
To understand your scenario better, please share some data sample and your desired output so that we could help further on it.
Please refer to this blog about how to get your question answered quickly.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Best Regards,
Cherry
- JainabaFrequent Visitor
I figured it out what i was missing was the cross filter
Jainaba wrote:Hello all, in need help with a measue
I am trying to get a number based on another number that is tied to a difffrent code that i have relatioships to.
I have a fact table that and created lots of measurments. all the measuments work if im doing a a relationship with many to many filtering both ways, exept this one.
If i change the relationship to filter the fact table to my data base the other measures do not give the correct number but this one does.
Which leaves me to belive i need to work on this measure.
here is how i have it written.
#2 Hang Tend = if( CONTAINS('Fact Table','Fact Table'[Item Name],"tend"),CALCULATE(CALCULATE((sum(PDSSN[PIECE_CNT])/2),PDSSN[YLD_GROUP] in {2030})-CALCULATE(Sum(PDSSN[PIECE_CNT]),PDSSN[YLD_GROUP] in{4098})))I have been trying to figure this out for days any help on this would be greatly appricated!!!