Forum Discussion
Field Parameter dynamic measure
- Anonymous2 years ago
Hi L_G ,
Please create 2 measures like:% on grand total = DIVIDE([Revenue],CALCULATE([Revenue],ALLEXCEPT('Table','Table'[Year])))cumulated % = VAR _all_year = CALCULATE([Revenue],ALLEXCEPT('Table','Table'[Year])) VAR _select_paramerter = MAX('Parameter'[Parameter]) VAR _country = CALCULATE([Revenue],'Table'[Country]<=MAX('Table'[Country])) VAR _product = CALCULATE([Revenue],'Table'[Product]<=MAX('Table'[Product])) VAR _month = CALCULATE([Revenue],'Table'[Month Number]<=MAX('Table'[Month Number])) VAR _result = SWITCH( _select_paramerter, "Country",DIVIDE(_country,_all_year), "Product",DIVIDE(_product,_all_year), "Month Number",DIVIDE(_month,_all_year) ) RETURN _resultOutput:
Please check the pbix file.
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
Hi L_G ,
Please create 2 measures like:
% on grand total = DIVIDE([Revenue],CALCULATE([Revenue],ALLEXCEPT('Table','Table'[Year])))cumulated % =
VAR _all_year = CALCULATE([Revenue],ALLEXCEPT('Table','Table'[Year]))
VAR _select_paramerter = MAX('Parameter'[Parameter])
VAR _country = CALCULATE([Revenue],'Table'[Country]<=MAX('Table'[Country]))
VAR _product = CALCULATE([Revenue],'Table'[Product]<=MAX('Table'[Product]))
VAR _month = CALCULATE([Revenue],'Table'[Month Number]<=MAX('Table'[Month Number]))
VAR _result =
SWITCH(
_select_paramerter,
"Country",DIVIDE(_country,_all_year),
"Product",DIVIDE(_product,_all_year),
"Month Number",DIVIDE(_month,_all_year)
)
RETURN
_result
Output:
Please check the pbix file.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
- L_G2 years agoHelper I
It works perfectly, thank you so much !!!
Anonymous