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
vk_pbi
Resolver II
Resolver II

Unable to get values in disconnected tables

Hi

I have a client table with around 30 columns and transanctional table, a date table.

I have created a disconnected table to show the transanctions based on a bucket as below, the value will calculate transanctions based on the client table.

0,

1-5,

5-10,

10-15,

20+ 

 

Measure I had created as below

VAR _T1 = 
SELECTCOLUMNS(
   SUMMARIZE(
       Client,
       Client[Tier], Client[ID],
       "@CallCount", [No of Trxs],
       "@order", SWITCH(
                 TRUE(),
                 [No of Trxs] <=0, 1,
                 [No of Trxs] >0 && [No of Trxs] <=5, 2,
                 [No of Trxs] >5 && [No of Trxs] <=10, 3,
                 [No of Trxs] >10 && [No of Trxs] <=20, 4,
                 5
               )
       ),
     "@bkt", [@order] )
RETURN
CALCULATE (
    [No of Trxs], 
    FILTER(
       DisconnectedTable,
       DisconnectedTable[ID] = _T1
      )
)
       

Don't understand why its not working.. Please guide me

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@vk_pbi , Try 2 measures like

 

M1= SWITCH(
TRUE(),
[No of Trxs] <=0, 1,
[No of Trxs] >0 && [No of Trxs] <=5, 2,
[No of Trxs] >5 && [No of Trxs] <=10, 3,
[No of Trxs] >10 && [No of Trxs] <=20, 4,
5
)

 

 

Final Measure =
Sumx(bucket, calculate( Sumx( filter( SUMMARIZE(
Client,
Client[Tier], Client[ID]), [M1] = max(bucket[Value]) ), [No of Trxs])))

 

or

 

Final Measure =
calculate( Sumx( filter( SUMMARIZE(
Client,
Client[Tier], Client[ID]), [M1] = max(bucket[Value]) ), [No of Trxs]))

 

refer

Dynamic Segmentation Bucketing Binning
https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1...


Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@vk_pbi , Try 2 measures like

 

M1= SWITCH(
TRUE(),
[No of Trxs] <=0, 1,
[No of Trxs] >0 && [No of Trxs] <=5, 2,
[No of Trxs] >5 && [No of Trxs] <=10, 3,
[No of Trxs] >10 && [No of Trxs] <=20, 4,
5
)

 

 

Final Measure =
Sumx(bucket, calculate( Sumx( filter( SUMMARIZE(
Client,
Client[Tier], Client[ID]), [M1] = max(bucket[Value]) ), [No of Trxs])))

 

or

 

Final Measure =
calculate( Sumx( filter( SUMMARIZE(
Client,
Client[Tier], Client[ID]), [M1] = max(bucket[Value]) ), [No of Trxs]))

 

refer

Dynamic Segmentation Bucketing Binning
https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1...


Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k

Hi @amitchandak 

The above meaure works fine, but the totals are not showing properly. Any idea how to fix this ?

@amitchandak 

Superb, thank you 🙂

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.