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 everyone,
I m new to DAX and struggling for the last 24 hours to create the measure based on another table but couldn't get it and found the message ( a table of multiple values was supplied where a single value was expected. My calculated column is working fine but I want to create a measure.
calculated column=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]
)
)
thanks
Hi @Anonymous
First, you have to describe clearly what you want to achieve. Second, measures are not calculated columns. They work in a totally different way and serve a different purpose. There's no direct translation of a calculated column into a measure. So, to get a good answer you have to do the above and I would also whole-heartedly recommend reading this: How to Get Your Question Answered Quickly - Microsoft Power BI Community
Then, after following all the advice, you may stand a good chance to get a good answer.
that is why I need help to create a measure
Using CALCULATE in calculated columns is one VERY BAD idea because you are invoking context transition on each and every row. This has many consequences. One of them being slow code.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
7 | |
6 |
User | Count |
---|---|
14 | |
13 | |
11 | |
9 | |
8 |