Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello people,
I try to show a table with just 50 lines, and i try to create a measure to show just the TOP50 values from the last month
>> and I get the error "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value."
P.S: I can't create calculated column because i'm connected with DirectQuery
Help me pls
J.O.
Solved! Go to Solution.
Hi @Anonymous,
Modify your measure as below:
Last_Month_price=
VAR _value=CALCULATE(MAX(fact_snapshot[last_amt]),PREVIOUSMONTH('Calendar'[Date]))
VAR _table=TOPN(50,fact_snapshot,_value,ASC)
Return
MAXX(_table,_value)
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Hi @Anonymous,
Modify your measure as below:
Last_Month_price=
VAR _value=CALCULATE(MAX(fact_snapshot[last_amt]),PREVIOUSMONTH('Calendar'[Date]))
VAR _table=TOPN(50,fact_snapshot,_value,ASC)
Return
MAXX(_table,_value)
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
@Anonymous , Try like
all(Fact_snapshot)
or
allselected(Fact_snapshot)
Hi @amitchandak ,
Thanks for the reply, but I had already tried this, but the error remains the same as I described above.
@Anonymous ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Hi @amitchandak ,
Sorry but it not possible.
But the measure "CALCULATE(MAX(fact_snapshot[last_amt]),PREVIOUSMONTH('Calendar'[Date]))" already return more than 1000000 rows. I just wont to show the TOP50 of this measure.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |