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
water-guy-5
Helper III
Helper III

Create an alert table based on multiple parameters

I have some different locations, and we perform sort of "random" updates/checks on how many managers there are currently in the building. For each location, there are a few different maximums. Most are 2, but a few are 3. Which can be seen here. We can call this table 1.

tab1.png

I am trying to create a table that highlights when the manager count exceeds the limit for each location. Here is an example of what the routine checks might look like.

tab2.png

In this case, Chicago exceeded its limit. I am having trouble setting indivudal limits and the syntax associated with it. It should look something like this.

IF(
     AND("Location" <> {"Houston", "Los Angeles", "New York"}, "Amount > "Manager Limit"), 1, 0) where 1 is the flag of exceedance.

However, I also need a column for the locations where the limit is 3.
IF(
     AND("Location" = {"Houston", "Los Angeles", "New York"}, "Amount > "Manager Limit"), 1, 0)

How do i get this all into one column. Or can I have two seperate measures and out both as filters = 1 in the filters pane. Also, how do i get it to search multiple areas using the '{', I know it's possible I'm just messing it up.

Please let me know if you have any more questions. Thanks!




1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @water-guy-5 ,

 

You can do this in two ways.

 

Having a calculated column for this you need  to relate both table by the location and then create the following calculated column:

Flag = IF(RELATED('Managers Limit'[Managers Limit]) < Checks[Amount], 1 , 0)

MFelix_0-1636733609779.png

 

Second option is creation of a measure:

CheckLocations =
IF (
    CALCULATE (
        MAX ( 'Managers Limit'[Managers Limit] ),
        'Managers Limit'[Location] = MAX ( Checks[LocationChecked] )
    )
        < SUM ( Checks[Amount] ),
    1,
    0
)

 

This works for related or unrelated tables.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

1 REPLY 1
MFelix
Super User
Super User

Hi @water-guy-5 ,

 

You can do this in two ways.

 

Having a calculated column for this you need  to relate both table by the location and then create the following calculated column:

Flag = IF(RELATED('Managers Limit'[Managers Limit]) < Checks[Amount], 1 , 0)

MFelix_0-1636733609779.png

 

Second option is creation of a measure:

CheckLocations =
IF (
    CALCULATE (
        MAX ( 'Managers Limit'[Managers Limit] ),
        'Managers Limit'[Location] = MAX ( Checks[LocationChecked] )
    )
        < SUM ( Checks[Amount] ),
    1,
    0
)

 

This works for related or unrelated tables.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.