Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi,
Due to performance issues I'm trying to use a measure instead of a calculated column. Now the column 'TotaalFout' is calculated in M (but maybe is in DAX better?) with the following logic: = Table.AddColumn(Table, "TotaalFout", each if [te_groot_bbp] = 1 then 1 else if [te_groot_pakket] = 1 then 1 else if [te_zwaar_bbp] = 1 then 1 else if [te_zwaar_pakket] = 1 then 1 else 0)
There is an exception that if it's te_groot (too big) AND te_zwaar (too heavy) it still calculates 1 beacause it's subject which the errors is about, is still one. This results in the follwing column:
The next step, why I find it hard to find a measure is that I use the sumfunction in the visual The collected data is dependend of dates. And I selected sum te_groot, te_zwaar and TotaalFout (etc..).
Does anyone has suggestions which kind of measure I could use?
Solved! Go to Solution.
Hi @lisannegesch ,
According the formula: = Table.AddColumn(Table, "TotaalFout", each if [te_groot_bbp] = 1 then 1 else if [te_groot_pakket] = 1 then 1 else if [te_zwaar_bbp] = 1 then 1 else if [te_zwaar_pakket] = 1 then 1 else 0)
Please have a try.
Create a measure:
TotaalFout =
IF (
MAX ( table[te_groot_bbp] ) = 1
|| MAX ( table[te_groot_pakket] ) = 1
|| MAX ( table[te_zwaar_bbp] ) = 1
|| MAX ( table[te_zwaar_pakket] ) = 1,
1,
0
)
If I have misunderstood your meaning, please provide more details with desired output and pbix file without privacy information.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @lisannegesch ,
According the formula: = Table.AddColumn(Table, "TotaalFout", each if [te_groot_bbp] = 1 then 1 else if [te_groot_pakket] = 1 then 1 else if [te_zwaar_bbp] = 1 then 1 else if [te_zwaar_pakket] = 1 then 1 else 0)
Please have a try.
Create a measure:
TotaalFout =
IF (
MAX ( table[te_groot_bbp] ) = 1
|| MAX ( table[te_groot_pakket] ) = 1
|| MAX ( table[te_zwaar_bbp] ) = 1
|| MAX ( table[te_zwaar_pakket] ) = 1,
1,
0
)
If I have misunderstood your meaning, please provide more details with desired output and pbix file without privacy information.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I don't understand what it is you are trying to achieve. In your final table, what values do you want in the TotaalFout column?
Please share your data/file - at least a subset of data so we don't have to recreate the whole lot.
Regards
Phil
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
103 | |
70 | |
68 | |
54 | |
41 |
User | Count |
---|---|
156 | |
83 | |
66 | |
64 | |
61 |