Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 5 | |
| 5 |
| User | Count |
|---|---|
| 24 | |
| 11 | |
| 11 | |
| 9 | |
| 8 |