Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hello There!
I need a hand in this problem:
General Context: The company ask me to creat in Excel a Sheet for the use of ours selling team, and for this I'm using Query, Pivote and Visualization.
Problem Context: There is some Measures, like the one down bellow, that some of the ID's cant be considered, as they are the Team Leaders, T.I Support and its Testes or even some other non comercial seller, so my sollution was: Creat a range of ID's that I would with the function "IF" transfor in blank.
THE PROBLEM: It in indeed work, but only if the Team leaders are filtered, so if I want to see every one of the sector, I Cant, as the Excel return the saying:
-----------------------------------------------------------------------------------------------------------------------------------------------
"MdxScript(Model) (17,58) Error in the measure calculation 'dMeta'[Positivação (Und)]]: A table of many values was delivered, and only one value was expected."*
-----------------------------------------------------------------------------------------------------------------------------------------------
*Free translation of portuguese to english
This one bellow is my DAX (in Pivot), some terms that are in portuguese to english:
Solved! Go to Solution.
Hi @Hrenechen ,
Please update the formula of calculated column [Goal Positivation (Und)] as below and check if it can return the expected result...
Goal Positivation (Und) :=
VAR POSITIVwACTIVES =
SUMX ( dGoal, dGoal[Positivation (%)] * [Active Base] )
VAR CodException =
MAX ( RcaException[ID.RCA Exception] )
RETURN
IF (
POSITIVwATIVOS = 0
|| ISBLANK ( POSITIVwATIVOS )
|| CONTAINS ( dMeta, [ID.RCA], CodException ),
BLANK (),
DIVIDE ( POSITIVwACTIVES, [Active Base], BLANK () )
) * [Active Base]
If the above one can't help you, please provide some raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. Also please provide the related info if there is any relationship among these tables. It would be helpful to find out the solution. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Rena, thank you!
Your sollution work fine, and my problem is solved, I will make sure to read your links about the best pratices for the comunity!
Be bless!
Hi @Hrenechen ,
Please update the formula of calculated column [Goal Positivation (Und)] as below and check if it can return the expected result...
Goal Positivation (Und) :=
VAR POSITIVwACTIVES =
SUMX ( dGoal, dGoal[Positivation (%)] * [Active Base] )
VAR CodException =
MAX ( RcaException[ID.RCA Exception] )
RETURN
IF (
POSITIVwATIVOS = 0
|| ISBLANK ( POSITIVwATIVOS )
|| CONTAINS ( dMeta, [ID.RCA], CodException ),
BLANK (),
DIVIDE ( POSITIVwACTIVES, [Active Base], BLANK () )
) * [Active Base]
If the above one can't help you, please provide some raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. Also please provide the related info if there is any relationship among these tables. It would be helpful to find out the solution. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards