Reply
jimod
Regular Visitor
Partially syndicated - Outbound

Difficulty with measures

 
I have a dax measue that evaluates conditions in the rows of table based on a combination of values from another table:
Autorisatie_fact = IF (
        COUNTROWS (
            FILTER (
                FACT_Realisatie,
                FACT_Realisatie[Kostenplaats_Key] = LOOKUPVALUE(RLS_Rol[Kostenplaats_Key], RLS_Rol[Kostenplaats_Key], FACT_Realisatie[Kostenplaats_Key]) ||
                FACT_Realisatie[Product_Key] = LOOKUPVALUE(RLS_Rol[Product_Key], RLS_Rol[Product_Key], FACT_Realisatie[Product_Key])
            )
        ) > 1,
        1,
        0
    )
 
There are purposefully no relations between the tables. I have another measure that returns another column text value if the conditions are met:
Crediteur =
IF(
        [Autorisatie_fact] = 1,
        SELECTEDVALUE(FACT_Realisatie[Crediteur]),
        "***"
   
)
This works fine but, now i want also to be able to summarize the text values output in order to aggregate the rows with other measures sum average etc...it needs to be done in measures in order to make the filter context apply.
 I have spend a week talking to chat gpt but still no working result. 
 
It should be something like: 
crediteurconditionbedrag
A110
B120
A110
C010

 

CrediteurBedrag 
A20 
B20 
 
1 ACCEPTED SOLUTION
v-tangjie-msft
Community Support
Community Support

Syndicated - Outbound

Hi @jimod ,

 

(1)Here are my test data.

vtangjiemsft_0-1716789046309.png

(2) We can create a new table.

Table 2 = FILTER(SUMMARIZE('Table',[Rediteur],"bedrag",SUM('Table'[bedrag])),[Rediteur] in {"A","B"})

(3) Then the result is as follows.

vtangjiemsft_1-1716789140163.png

 

If this doesn't help you, give examples of input and output data and explain your logic. Preferably a PBIX file (take care to protect your private data)

 

Best Regards,

Neeko Tang

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

View solution in original post

1 REPLY 1
v-tangjie-msft
Community Support
Community Support

Syndicated - Outbound

Hi @jimod ,

 

(1)Here are my test data.

vtangjiemsft_0-1716789046309.png

(2) We can create a new table.

Table 2 = FILTER(SUMMARIZE('Table',[Rediteur],"bedrag",SUM('Table'[bedrag])),[Rediteur] in {"A","B"})

(3) Then the result is as follows.

vtangjiemsft_1-1716789140163.png

 

If this doesn't help you, give examples of input and output data and explain your logic. Preferably a PBIX file (take care to protect your private data)

 

Best Regards,

Neeko Tang

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

avatar user

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)