Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
I have this code in dax, I need to be able to execute the code that is marked as "<-- ERROR", using the table variable.
var tb = CALCULATETABLE(
SELECTCOLUMNS(RawData
,"service",RawData[Service]
,"period",RawData[StartOfPeriod_]
,"volume",RawData[Contact Volume]
,"position",RawData[Position]
))
var tb2 = CALCULATETABLE(
SELECTCOLUMNS(tb
,"service",[service]
,"period",[period]
,"volume",[volume]
,"position",RANKX(FILTER(
tb,
[service] = EARLIER([service]) &&
[period] = EARLIER([period])),[position],,ASC,Dense)
,"vendors",CALCULATE(COUNT([service]),ALLEXCEPT(tb,tb[StartOfPeriod_],tb[Service])) <-- ERROR
))
Any help?
@SilvioLunaPBI , Try like
addcolumns(summarize(tb
,"service",[service]
,"period",[period]
,"volume",[volume])
,"position",RANKX(FILTER(
tb,
[service] = EARLIER([service]) &&
[period] = EARLIER([period])),[position],,ASC,Dense)
,"vendors",CALCULATE(COUNT(tb[service]),ALLEXCEPT(tb,tb[StartOfPeriod_],tb[Service]))
)
Can you share a sample pbix after removing sensitive data.
I need to do it all in the measure not in calculated columns, I need to use dynamic filter all in measure
this is an example of file: https://drive.google.com/file/d/1e-PTQHjC-fFvhGMQiYNpNFW_67gBBZe8/view?usp=sharing
Tks
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
25 | |
19 | |
14 | |
10 | |
7 |