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 Guys,
My problem here is an extension of what is here ..
I am trying to extract SRF values from a table titled 'TowerResultExtremeYielding' , between 2 levels or heights as indicated by
'MaxHeight; and 'MidBot' , both of which are available in a table called 'Bottom_Middle' as shown below:
Now I have this code below which works well for one filter which is < but I have 2 filters now and i need to filter between 2 levels
MID_Section_SRF_BYLEVEL = SELECTCOLUMNS( GENERATE( SELECTCOLUMNS( 'Bottom_Middle', "Tower ID",Bottom_Middle[TowerModelId], "Midtop", Bottom_Middle[MIdtoplevel], "Midbot",Bottom_Middle[Bottom_Section_Height] ), VAR MaxHeight = [Midtop] VAR Midbot=[Midbot] RETURN CALCULATETABLE( SELECTCOLUMNS( 'TowerResultExtremeYielding', "height", TowerResultExtremeYielding[Level], "SRF", TowerResultExtremeYielding[Extreme_SRF], "Loadcase", TowerResultExtremeYielding[LoadCase] ), TowerResultExtremeYielding[Level] <= MaxHeight && TowerResultExtremeYielding[Level] >=Midbot ) ), "Tower ID", [Tower ID], "Height", [height], "SRF", [SRF], "Loadcase",[LoadCase] )
as shown below but when I run this script I get an error with memory. Could somebody help me here ?
Solved! Go to Solution.
@vito123 , here is your table:
FILTER (
SUMMARIZE (
'TowerResult ExtremeYielding',
Bottom_Middle[Tower Model ID],
'TowerResult ExtremeYielding'[ Level],
'TowerResult ExtremeYielding'[SRF]
),
VAR _id = CALCULATE ( MAX ( Bottom_Middle[Tower Model ID] ) )
VAR midlevel =
CALCULATE (
MAX ( Bottom_Middle[Midtop Level] ),
Bottom_Middle[Tower Model ID] = _id
)
VAR btmlevel = CALCULATE ( MAX ( Bottom_Middle[Bottom Section Height] ) )
RETURN
[ Level] >= btmlevel && [ Level] <= midlevel
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.
Check out my latest demo report in the data story gallery.
Stand with Ukraine!
Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/
Thank you!
@vito123 , can you provide the demos of initial tables (not screenshots) and the result you want to achieve (a new calculated table, a measure to filter some table, etc)?
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.
Check out my latest demo report in the data story gallery.
Stand with Ukraine!
Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/
Thank you!
Hi @ERD , Hope this helps:
Step:1 Table called 'Bottom_Middle' containing the relevant columns as below
Tower Model ID | Midtop Level | Bottom Section Height |
123 | 345 | 20 |
124 | 500 | 200 |
125 | 400 | 10 |
Step:-2 Now we have another table called 'TowerResult ExtremeYielding' which contains the SRF value by level for each towerMOdel ID as shown below:
Tower Model ID | Level | SRF |
123 | 345 | 1.2 |
123 | 300 | 2 |
123 | 250 | 1.2 |
123 | 10 | 1.5 |
124 | 600 | 2.1 |
124 | 500 | 1.2 |
124 | 400 | 1.1 |
124 | 300 | 1.4 |
124 | 100 | 1.1 |
125 | 450 | 1.3 |
125 | 400 | 2 |
125 | 10 | 3 |
Step:-3 Desired output is a TABLE that needs to contain the desired values for each towermodelID between the midtoplevel and Bottom Section Height as shown below:
Tower Model ID | Level | SRF |
123 | 345 | 1.2 |
123 | 300 | 2 |
123 | 250 | 1.2 |
124 | 500 | 1.2 |
124 | 400 | 1.1 |
124 | 300 | 1.4 |
125 | 450 | 1.3 |
125 | 400 | 2 |
125 | 10 | 3 |
I hope this clarifies what I need , @ERD , Please let me know if otherwise..
@vito123 , here is your table:
FILTER (
SUMMARIZE (
'TowerResult ExtremeYielding',
Bottom_Middle[Tower Model ID],
'TowerResult ExtremeYielding'[ Level],
'TowerResult ExtremeYielding'[SRF]
),
VAR _id = CALCULATE ( MAX ( Bottom_Middle[Tower Model ID] ) )
VAR midlevel =
CALCULATE (
MAX ( Bottom_Middle[Midtop Level] ),
Bottom_Middle[Tower Model ID] = _id
)
VAR btmlevel = CALCULATE ( MAX ( Bottom_Middle[Bottom Section Height] ) )
RETURN
[ Level] >= btmlevel && [ Level] <= midlevel
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.
Check out my latest demo report in the data story gallery.
Stand with Ukraine!
Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/
Thank you!
User | Count |
---|---|
21 | |
19 | |
12 | |
10 | |
9 |
User | Count |
---|---|
30 | |
25 | |
15 | |
13 | |
10 |