This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi, all
I wonder why this is error
1EA = CALCULATE(count('Table'[itemlv2_lastlinkconsumerid]), 'Table'[dvc_total] = 1)
I want to show the number of devices by Device Type (=n_combination) in a table as shown below.
However, if you generate the measure value in the above equation, there will be an error occurs.
dvc_total is also a measure value.
I would appreciate it if you could let me know how to get it.
Solved! Go to Solution.
Hi @Anonymous ,
Here are the steps you can follow:
1. Create calculated column.
total =
var _table=SUMMARIZE('Table','Table'[Id],'Table'[Dvcgroup],'Table'[n_combination],'Table'[cnt])
return
SUMX(FILTER( _table,[Id]=EARLIER([Id])&&[n_combination]=EARLIER([n_combination])),[cnt])
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Anonymous ,
Here are the steps you can follow:
1. Create calculated column.
total =
var _table=SUMMARIZE('Table','Table'[Id],'Table'[Dvcgroup],'Table'[n_combination],'Table'[cnt])
return
SUMX(FILTER( _table,[Id]=EARLIER([Id])&&[n_combination]=EARLIER([n_combination])),[cnt])
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
@Anonymous You cannot use a measure directly in the filter parameter of CALCULATE, you have to wrap it with FILTER like:
1EA = CALCULATE(count('Table'[itemlv2_lastlinkconsumerid]), FILTER('Table','Table'[dvc_total] = 1))
May I ask you a question?
how to calculate total?
I tried like
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 30 | |
| 23 | |
| 23 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 63 | |
| 38 | |
| 25 | |
| 23 | |
| 22 |