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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mco_jr
Frequent Visitor

Measure not respecting data segmentation

Hi everyone, currently I'm trying to see every indicator that doesn't have any justification text at the last table below.

But everytime that I add a table to my report and try to add a measure that I'm using to check if the indicator is blank or not , the table just shows every indicator possible, not respecting the data segmentation that I have in my report.

 

Indicator table:

ID Indicator
1 A
2 B
3 C
4 D


Offshoot Table:

ID Offshoot Section
1 11 Q
1 12 W
2 2 Q
3 31 E
3 32 R
4 41 Q
4 42 W


Justification table:

Offshoot Date JustificationText
11 01/01/2024 ASD
12 01/01/2024 
2 01/01/2024 
32 01/01/2024 QWE
41 01/01/2024 ZXC
42 01/02/2024 



I'm currently using this measure:

 

AnaliseCritica =
IF(ISBLANK(MAX('Justification'[JustificationText])), "","x")
 
I'm using 2 segmentation datas, one for section other for month, but everytime that I add this measure in my table, he just ignore those segmentations (it didn't happen when I just don't use this measure)
My table always show this kind of result:

Indicator Section AnaliseCritica
A Q x
A W 
B Q 
C E 
C R x
D Q x
D W 

 

If my section was filtered to Q, it should be like that:

Indicator Section AnaliseCritica
A Q x
B Q 
D Q x
1 ACCEPTED SOLUTION
v-tangjie-msft
Community Support
Community Support

Hi @mco_jr ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) Click "transform data" to enter the power query, create two new tables, open the "Advanced Editor" copy and paste the following code.

let
    Source = Table.NestedJoin(#"Indicator table", {"ID"}, #"Offshoot Table", {"ID"}, "Offshoot Table", JoinKind.LeftOuter),
    #"Expanded Offshoot Table" = Table.ExpandTableColumn(Source, "Offshoot Table", {" Offshoot", " Section"}, {"Offshoot Table. Offshoot", "Offshoot Table. Section"})
in
    #"Expanded Offshoot Table"
let
    Source = Table.NestedJoin(Merge1, {"Offshoot Table. Offshoot"}, #"Justification table", {"Offshoot"}, "Justification table", JoinKind.LeftOuter),
    #"Expanded Justification table" = Table.ExpandTableColumn(Source, "Justification table", {" JustificationText"}, {"Justification table. JustificationText"}),
    #"Renamed Columns" = Table.RenameColumns(#"Expanded Justification table",{{"Offshoot Table. Section", "Section"}}),
    #"Removed Columns" = Table.RemoveColumns(#"Renamed Columns",{"ID", "Offshoot Table. Offshoot"}),
    #"Renamed Columns1" = Table.RenameColumns(#"Removed Columns",{{"Justification table. JustificationText", "JustificationText"}}),
    #"Replaced Value" = Table.ReplaceValue(#"Renamed Columns1"," ",null,Replacer.ReplaceValue,{"JustificationText"})
in
    #"Replaced Value"

vtangjiemsft_0-1710987811573.png

(3) We can create a measure. 

AnaliseCritica = IF(ISBLANK(MAX('Merge2'[JustificationText])),"","x")

(4) Then the result is as follows.

vtangjiemsft_1-1710987864661.png

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

2 REPLIES 2
v-tangjie-msft
Community Support
Community Support

Hi @mco_jr ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) Click "transform data" to enter the power query, create two new tables, open the "Advanced Editor" copy and paste the following code.

let
    Source = Table.NestedJoin(#"Indicator table", {"ID"}, #"Offshoot Table", {"ID"}, "Offshoot Table", JoinKind.LeftOuter),
    #"Expanded Offshoot Table" = Table.ExpandTableColumn(Source, "Offshoot Table", {" Offshoot", " Section"}, {"Offshoot Table. Offshoot", "Offshoot Table. Section"})
in
    #"Expanded Offshoot Table"
let
    Source = Table.NestedJoin(Merge1, {"Offshoot Table. Offshoot"}, #"Justification table", {"Offshoot"}, "Justification table", JoinKind.LeftOuter),
    #"Expanded Justification table" = Table.ExpandTableColumn(Source, "Justification table", {" JustificationText"}, {"Justification table. JustificationText"}),
    #"Renamed Columns" = Table.RenameColumns(#"Expanded Justification table",{{"Offshoot Table. Section", "Section"}}),
    #"Removed Columns" = Table.RemoveColumns(#"Renamed Columns",{"ID", "Offshoot Table. Offshoot"}),
    #"Renamed Columns1" = Table.RenameColumns(#"Removed Columns",{{"Justification table. JustificationText", "JustificationText"}}),
    #"Replaced Value" = Table.ReplaceValue(#"Renamed Columns1"," ",null,Replacer.ReplaceValue,{"JustificationText"})
in
    #"Replaced Value"

vtangjiemsft_0-1710987811573.png

(3) We can create a measure. 

AnaliseCritica = IF(ISBLANK(MAX('Merge2'[JustificationText])),"","x")

(4) Then the result is as follows.

vtangjiemsft_1-1710987864661.png

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. 

Thank you!

I was trying not to merge them(more than a million rows), but I guess that I don't have any other option

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.