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.
Hi,
I'm struggling to find the right syntax for a measure that needs to produce a series of operations through a calculated column.
I have column "Audio Degradation Average" that contains a STRING in this format: 015: [0.01 - 0.02), where:
I need to:
I started to create variables in my measure for each passage, but I cannot find the right aggregators or iterators to perform these operations row by row. I cannot use calculated columns as the dataset is already huge.
Can anybody help?
Solved! Go to Solution.
@Anonymous
Looks like you have only one way out: you have to either write DAX in such a way that the engine is able to translate it into the language of the underlying source system (SQL, I guess), or you have to write the M code in exactly the same way. You just have to experiment and I would start with M as it has more functions.
Thanks, I guess it will be a learning curve...
@Anonymous
Looks like you have only one way out: you have to either write DAX in such a way that the engine is able to translate it into the language of the underlying source system (SQL, I guess), or you have to write the M code in exactly the same way. You just have to experiment and I would start with M as it has more functions.
@Anonymous
perhaps you can add that column we had earlier directly in the source? Or in the query editor?
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Nope...
I also tried to add a calculated column = Audio Degradation Avg, with the intent of manipulating it later, but that's just not possible:
I don't have access to the data source... the only way is through the connector.
Alienvolm
@Anonymous
So we'll do it all within the measure then:
AVG measure =
AVERAGEX (
Table1,
CONVERT ( LEFT ( Table1[Audio Degradation Average], 3 ), DOUBLE ) / 100
)
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Thanks!
I was really hoping it would work:
But this is what I get in the visuals:
This seems to happen whenever I use SUMX or AVERAGEX in an expression, with or without CALCULATE. And I cannot work in Import mode as the dataset is too large.
Thanks anyway, you definitely clarified the syntax for me!
Alienvolm
Hi @Anonymous
How about you first create a calculated column in your table to get the number:
NewColumn =
CONVERT ( LEFT ( Table1[Audio Degradation Average], 3 ), DOUBLE ) / 100
and the create a measure that will calculate the average.
AVG Measure =
AVERAGE ( Table1[NewColumn] )
Place the measure in a card visual
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Hi @AlB ,
That's my problem... I cannot create calculated columns.
I'm working with the CQD connector in Direct Query, and calculated columns will not work:
Thanks!
Alienvolm
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
12 | |
11 | |
8 | |
6 |