Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi.
I have transformed the data from power query to BI and now trying to make the new measure like
If season type = " Budgeting" & Market = "UO", Sales gross ACC / 66% ..............
But the thing is, power bi can not find the volume of season type and Market even it is in the table clearly. they can only bring other measures that I have created..
Is there anyway I can bring season type and Market to the if condition?
here is the table.
Dax that I am trying to write is
SWITCH(
TRUE(),
-- UX-O7 conditions
FT_Main[Season type] = "Budgeting" && FT_Main[Planning Market] = "UX-O7", FT_Main[Sales gross plan acc] / 0.66,
FT_Main[Season type] = "Planning" && FT_Main[Planning Market] = "UX-O7", FT_Main[Sales gross plan acc] / 0.65,
If I try to put season type in power bi,
THEY DO NOT FIND ANY MY FT TABLE AND ANY COLUMNS...
Please kindly support.
Solved! Go to Solution.
Hi @JIN23 ,
Thanks for the reply from rajendraongole1 , please allow me to provide another insight:
You should understand the difference between a calculated column and a measure in DAX.
A "calculated column" is a column created in a table, just like any other column. However, the result of a calculated column counts against a calculated expression (DAX). Typically, a calculated column utilises a DAX expression applied to each row in the dataset and the result is stored in a new column. One of the very important concepts about computation that is applied in a computed column (which in most cases is not always the case); is computation one row at a time, or in other words; row by row.
Measures are usually calculations that work at the aggregation level. Measures are dynamic in nature; they affect a subset of the data in one or more tables. Therefore, the subset of data can be changed through filters applied in Power BI reports, and the calculations must then be evaluated dynamically. Therefore, measures are not pre-calculated, but are calculated on-the-fly as they are added to the report.
More information about the difference can be found at the link:
Measure vs Calculated Column: The Mysterious Question? Not! - RADACAD
So, in my example data, if you use a calculated column, you can use the following formula:
Column =
SWITCH(TRUE(),
'financials'[Country] = "Canada" && 'financials'[Discount Band] = "Low",1)
If you use a measure , you can use the following formula:
Measure =
SWITCH(TRUE(),
MAX('financials'[Country]) = "Canada" && MAX('financials'[Discount Band]) = "Low", 1)
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @JIN23 ,
Thanks for the reply from rajendraongole1 , please allow me to provide another insight:
You should understand the difference between a calculated column and a measure in DAX.
A "calculated column" is a column created in a table, just like any other column. However, the result of a calculated column counts against a calculated expression (DAX). Typically, a calculated column utilises a DAX expression applied to each row in the dataset and the result is stored in a new column. One of the very important concepts about computation that is applied in a computed column (which in most cases is not always the case); is computation one row at a time, or in other words; row by row.
Measures are usually calculations that work at the aggregation level. Measures are dynamic in nature; they affect a subset of the data in one or more tables. Therefore, the subset of data can be changed through filters applied in Power BI reports, and the calculations must then be evaluated dynamically. Therefore, measures are not pre-calculated, but are calculated on-the-fly as they are added to the report.
More information about the difference can be found at the link:
Measure vs Calculated Column: The Mysterious Question? Not! - RADACAD
So, in my example data, if you use a calculated column, you can use the following formula:
Column =
SWITCH(TRUE(),
'financials'[Country] = "Canada" && 'financials'[Discount Band] = "Low",1)
If you use a measure , you can use the following formula:
Measure =
SWITCH(TRUE(),
MAX('financials'[Country]) = "Canada" && MAX('financials'[Discount Band]) = "Low", 1)
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @JIN23 - can you please create a calculcuted column with switch:
YourMeasureName =
SWITCH(
TRUE(),
FT_Main[Season type] = "Budgeting" && FT_Main[Planning Market] = "UO", FT_Main[Sales gross plan acc] / 0.66,
FT_Main[Season type] = "Planning" && FT_Main[Planning Market] = "UO", FT_Main[Sales gross plan acc] / 0.65,
BLANK()
)
stillissue exist, please share sample data will check
Hope it works
Proud to be a Super User! | |
Hi. Could you elaborate a bit more on calculated column? I have clicked new measurement then wrote those formula but I could not bring season type and planning market to the condition. BI said, they can not find the columns of season type and planning market even I do have it as the above pic..
Hi @JIN23 - It is a measure calculation, not cc
still issue exist, Please share sample data and expectations.
Proud to be a Super User! | |
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
86 | |
82 | |
70 | |
49 |
User | Count |
---|---|
143 | |
123 | |
107 | |
61 | |
55 |