Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi
Good Morning everyone, everyone I m new to power bi so needs your help to create the measure. I'm trying it for the last 24 hours but couldn't get it right. please help me. I have tried the below-mentioned measure but it shows error ( a table of multiple values was supplied where single value was expecting)
Calculated Column Tariff = CALCULATE(LASTNONBLANK(Tariff_ExpTHC1[Tariff],1),FILTER(Tariff_ExpTHC1,'Document Line'[Size2]=Tariff_ExpTHC1[Size]&&'Document Line'[Activity No_]=Tariff_ExpTHC1[No.]&&'Document Line'[Gross Weight]>=Tariff_ExpTHC1[From_Wt]&&'Document Line'[Gross Weight]<=Tariff_ExpTHC1[To_Wt]&&'Document Line'[LEO Date]>=Tariff_ExpTHC1[From_Date]&&'Document Line'[LEO Date]<=Tariff_ExpTHC1[To_Date]) )
Tariff_Ex_Document_Line( measure) = CALCULATE(
MAXX(Tariff_ExpTHC1,Tariff_ExpTHC1[Tariff]),
TREATAS(
SUMMARIZE('Document Line’, ‘Document Line'[Activity No_],
'Document Line'[Size2]),
Tariff_ExpTHC1[No.],
Tariff_ExpTHC1[Size]
),
FILTER(
Tariff_ExpTHC1,
VALUES('Document Line'[Gross Weight])>=Tariff_ExpTHC1[From_Wt]
&& VALUES('Document Line'[Gross Weight])<=Tariff_ExpTHC1[To_Wt]
&& VALUES('Document Line'[LEO Date])>=Tariff_ExpTHC1[From_Date]
&& VALUES('Document Line'[LEO Date])<=Tariff_ExpTHC1[To_Date]
)
)
Solved! Go to Solution.
Hi @Anonymous ,
To my knowledge, I think the below syntax is incorect.
You may try to use the following formula to modify it :
FILTER(
Tariff_ExpTHC1,
'Document Line'[Gross Weight]>=MAX(Tariff_ExpTHC1[From_Wt])
&& 'Document Line'[Gross Weight]<=MAX(Tariff_ExpTHC1[To_Wt])
&& 'Document Line'[LEO Date]>=MAX(Tariff_ExpTHC1[From_Date])
&& 'Document Line'[LEO Date]<=MAX(Tariff_ExpTHC1[To_Date])
)
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
To my knowledge, I think the below syntax is incorect.
You may try to use the following formula to modify it :
FILTER(
Tariff_ExpTHC1,
'Document Line'[Gross Weight]>=MAX(Tariff_ExpTHC1[From_Wt])
&& 'Document Line'[Gross Weight]<=MAX(Tariff_ExpTHC1[To_Wt])
&& 'Document Line'[LEO Date]>=MAX(Tariff_ExpTHC1[From_Date])
&& 'Document Line'[LEO Date]<=MAX(Tariff_ExpTHC1[To_Date])
)
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
59 | |
59 | |
56 | |
38 | |
29 |
User | Count |
---|---|
80 | |
62 | |
45 | |
40 | |
39 |