The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Dear all,
I'm doing a lab with Power BI, using DAX studio connect to my dataset in power BI. I could get the result when write the dax code in dax studio, but It got failure when I try this measure with Power BI, could someone assist me ?
below is the code in DAX studio and it could get the correct result
EVALUATE
var temp =
SUMMARIZE(all_data1,all_data1[Illness],"SUM",SUMX(all_data1,all_data1[Paid amount]))
return
TOPN(10,temp,[SUM],DESC)
Here is the measure which I tried with Power BI , it said "The expression refers to multiple columns. Multiple columns can not be convert to a scalar value"
top10 =
var temp =
SUMMARIZE(all_data1,all_data1[Illness],"SUM",SUMX(all_data1,all_data1[Paid amount]))
return
TOPN(10,temp,[SUM])
Solved! Go to Solution.
hi @Anonymous
DAX studio returns a table, while a measure returns a scalar/single value. That is the issue. So in a measure definition, the outmost or last function is typically count/sum(x)/min/max.
hi @Anonymous
DAX studio returns a table, while a measure returns a scalar/single value. That is the issue. So in a measure definition, the outmost or last function is typically count/sum(x)/min/max.
User | Count |
---|---|
16 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
25 | |
13 | |
12 | |
8 | |
8 |