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.
This is an silly issue but really i need help. I am trying to convert below to display records and rank wise but while converting it's throwing error. But it's working fine when i browse the tabular cube and write the query.
evaluate
ADDCOLUMNS(test, "Rank", countrows(FILTER (TEST,[Paid_Amount]>=EARLIER([PAID_AMOUNT]) )
)
)
Solved! Go to Solution.
Hi Paid Amount isMeasure in my model.
Paid Amount:=sum('Fact Claim'[Paid Original Amount]). when i am trying to use inside of earlier Paid Amount not listed.
Other way which you are provided i ahve tried same measure but it's throwing me an error.
Hi,
I think in your original formula before converted, the [Paid Amount] is a column but not a measure, so maybe you can try this:
Ranking =
ADDCOLUMNS (
'Fact Claim',
"Rank", COUNTROWS (
FILTER (
'Fact Claim',
'Fact Claim'[Patient Paid Amount]
>= EARLIER ( 'Fact Claim'[Patient Paid Amount] )
)
)
)
The result shows:
See my attached pbix file.
Best Regards,
Giotto
Hi Paid Amount isMeasure in my model.
Paid Amount:=sum('Fact Claim'[Paid Original Amount]). when i am trying to use inside of earlier Paid Amount not listed.
Other way which you are provided i ahve tried same measure but it's throwing me an error.
@Anonymous , You can use min or max and create an earlier kind of formula in measure. But row context/group by is missing in this
Ranking = ADDCOLUMNS('Fact Claim',"Rank",COUNTROWS(FILTER('Fact Claim',[Paid Amount]>=min([Paid Amount]))))
Still getting issue while using min.I think so arithematic functions will not work tabular model source.
@Anonymous
your Paid AMount is a measure
try to use SELECTEDVALUE() instead of MIN()
Hi, I am trying to use measure in selected value but am not getting measure into the list. is there any other way i can write.
Hi @Anonymous ,
The following DAX is missing EARLIER function in the highlighted section:
Ranking = ADDCOLUMNS('Fact Claim',"Rank",COUNTROWS(FILTER('Fact Claim',[Paid Amount]>=[Paid Amount])))
Try writing it as:
Ranking = ADDCOLUMNS(
'Fact Claim',"Rank",COUNTROWS(
FILTER(
'Fact Claim',[Paid Amount]>=EARLIER([Paid Amount])
)
)
)
If this helps and resolves the issue, appreciate a Kudos and mark it as a Solution! 🙂
Thanks,
Pragati
Hi, Earlier is used with calucalted columns not with measures so that is the reason am not using earlier.
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 |
---|---|
112 | |
99 | |
82 | |
70 | |
63 |
User | Count |
---|---|
145 | |
111 | |
104 | |
84 | |
64 |