Forum Discussion
DAX measure Suggestion
- Anonymous6 years ago
Hi ahmetturetmis,
You can use following calculate table formula to create a new table that summary raw table value, it should dynamically change based on the raw 'calculation table':
summary = GROUPBY ( SUMMARIZE ( T2, [FROM CBS], [FOCUS CBS], [MH], "Rate", [Final Weightage] * [MH] ), [FOCUS CBS], "Total", SUMX ( CURRENTGROUP (), [Rate] ) )Regards,
Xiaoxin Sheng
Hi ahmetturetmis,
So you mean you want to create a measure that can get the diff based on selection ranges and current category type?
If this is a case, you can write a measure with a variable to extract the special ranges and summarize that ranges with your measure formulas based on the index fields. (you can't directly use two text values to find out the records between the selection records)
measure =
VAR _start =
MIN ( table[Index] )
VAR _end =
MAX ( selector[Index] )
VAR currLFD =
CALCULATE (
[Last Factor Denominated],
ALLSELECTED ( table ),
VALUES ( table[From Cbs] )
)
VAR summary =
SUMMARIZE (
FILTER ( ALLSELECTED ( table ), [Index] >= _start && [Index] <= _end ),
[From Cbs],
"LFD", [Last Factor Denominated]
)
RETURN
currLFD / SUMX ( summary, [LFD] )
In addition, it will help if you share some dummy data with your formulas for future testing.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng