Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
20 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |