Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply

need help in a logic/Dax

Hi All,

 

need one help correction of logic or dax pls.. below is the scenario's..

 

This is my report page. Here, I've selected Feb in calendare slicer and one employee name in wins slicer.

PowerBIBeginer_0-1712232522724.png

Proc FTE Available Hours = (SUM('ZActive'[AEDT.FTE HoursA])-[LT.Leave Hours]
-[LT.FTE_SYSTEM_OUTAGE]-[LT.FTE IN Meetings]-[LT.FTE ON DT]-[LT.FTE_Calls])
+[LT.FTE_OVERTIME]
 
Proc FTE Available Hours final = DIVIDE(SUM('ZActive'[AEDT.FTE HoursA])-[LT.Leave Hours]
-[LT.FTE_SYSTEM_OUTAGE]-[LT.FTE IN Meetings]-[LT.FTE ON DT]-[LT.FTE_Calls]
+[LT.FTE_OVERTIME],[test])
 
Proc Prod = IF((ISBLANK([Lost Account]) && ISBLANK([EDP]) && ISBLANK([3rd party]) &&
ISBLANK([Naming]) && ISBLANK([Canceled])),
IFERROR([Total Work]/[Proc FTE Available Hours],""),
([Total Work]/[Proc FTE Available Hours final]))
 
and my 
test = CALCULATE(MAX(ZActive[StepUpTarget%]),ALL(ZActive))
 
I want to design [test] dax in such way that if employee name selected and if i select month then "step up target%" value got picked up for that employee for that month in [test] dax.
 
"step up target%" column here in below screenshot..
PowerBIBeginer_1-1712232992379.png

 

if its next month then

PowerBIBeginer_2-1712233105376.png

 

but currentlly [test] dax only showing me 74 value, irrespective of any name and month selection.. 

 

5 REPLIES 5
johnbasha33
Solution Sage
Solution Sage

@PowerBIBeginer  unable to follow your question

v-xinruzhu-msft
Community Support
Community Support

Hi @PowerBIBeginer 

@Greg_Deckler  ,thank for your attention to this issue and I want to offer some information so that can help user solve the problem.

You can try the following measure.

test =
CALCULATE (
    MAX ( ZActive[StepUpTarget%] ),
    ALLEXCEPT ( ZActive, ZActive[Employee Name], ZActive[Month] )
)

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Thank You Yolo, for your time and responce. Slicer which I'm using on report page are month from "Calendar" table and wins name means "Employee Master" table. i think accordingly this two slilcer you try to use AllExcept statement, is it? If so, how can that be written then, pls guide

Hi @PowerBIBeginer 

What is your relationship among the tables,can you provide the relationship among the tables so that I can provide some more information for you.

 

Best Regards!

Yolo Zhu

 

 

Greg_Deckler
Super User
Super User

@PowerBIBeginer Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.