Forum Discussion

JC25's avatar
JC25
Regular Visitor
2 years ago

Data not showing in visual report

I am trying to created a visual table that shows the monthly values of a vessel. However, some of my data are not showing even though there's value in the source data. How do I solve this?

 

Example of my source data - let's call it Table_A:


Table_A_Slicer:


My measures:

Monthly_fuel_consumption =
VAR LogicTest =
COUNTROWS(DISTINCT(
    FILTER(
        ALLSELECTED('Table_A_Slicer'[Selection]),
        'Table_A_Slicer'[Selection] = "Fuel Consumption"
    )
)) = 1

RETURN
IF(
    LogicTest,
    SUMX(Table_A,'Table_A'[Fuel consumption (L)]),
    BLANK()
)

Monthly_fuel_consumption_actual =
VAR LogicTest =
COUNTROWS(DISTINCT(
    FILTER(
        ALLSELECTED('Table_A_Slicer'[Selection]),
        'Table_A_Slicer'[Selection] = "Fuel Consumption Actual"
    )
)) = 1

RETURN
IF(
    LogicTest,
    SUMX(Table_A,'Table_A'[Fuel consumption actual (L)]),
    BLANK()
)

Expected visual table:

 

The visual table I got (September fuel consumption data missing):

 

1 Reply

  • HotChilli's avatar
    HotChilli
    Icon for Community Champion rankCommunity Champion

    In the absence of any test data , I think I will advise you to create some test measures and test the logic in your measures.

    You need to identify if the problem is coming from the LogicTest or the SUMX.  That should be straightforward to test (just fake the value of LogicTest to be true).

    You didn't say what state the slicer is in when you get these results.  Also, I've never seen this type of DAX to test if a slicer has a particular value .  Do you have confidence in it?