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
Anonymous
Not applicable

Get data from table 2

Hi Guys,

I hope you can help me. I'm new to the Power BI.

 

Table 1: Data from Mar 19 - till date

Table 2: Data from Jan 19 - Feb 19

Table 3: Calendar table

 

I would like to get the data from table 2 as well when I select month name from Calendar table. I've created relationship but it doesn't work out for table 2. Please help me.

 

pv_powerbi_1-1572441414322.png

 

Kind regards,

pv

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @Anonymous ,

Your column chart's x-axis and y-axis are both from Table 1, not Table 2. So, it will show blank when you choose "January" or "February". 

Try this:

1. Create measures. Please pay attention to your blank values in "Concatenate". Not blank, but "   ".

 

Count of Defected data =
IF (
    MAX ( 'Data Collection'[Concatenate] ) = "   ",
    BLANK (),
    COUNT ( 'Data Collection'[Concatenate] )
)
Count of defected =
IF (
    MAX ( 'dCollection(Jan-Feb)'[Concatenate] ) <> "   ",
    COUNT ( 'dCollection(Jan-Feb)'[Concatenate] )
)
Defected all =
IF (
    ISBLANK ( MAX ( 'Concatenate'[Concatenate] ) ),
    BLANK (),
    [Count of defected] + [Count of Defected data]
)

 

2. Create a table.

 

Concatenate =
FILTER (
    VALUES ( 'Data Collection'[Concatenate] ),
    'Data Collection'[Concatenate] <> "   "
)

 

column3.PNG

3. Create a column chart.

column1.PNGcolumn2.PNG

 

PBIX file attached.

 

Best Regards,
Icey

 

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

18 REPLIES 18

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.