Forum Discussion

KevinSV's avatar
KevinSV
Helper II
1 year ago
Solved

Filtrer in one line

Hello everyone,  I need your help on my Power BI Desktop.  First of all, i import my data from a SQL Server for my report. I put some slicers for filter and give a table after the filtrer.  In thi...
  • KevinSV's avatar
    KevinSV
    1 year ago

    Here is the update of the topic : 
    So i modify my code : 

    CombinedTable2 =

    UNION(

    SELECTCOLUMNS(

        SUMMARIZE(

            FILTER(ALL('PCA'); 'PCA'[IsAggregateRow] = 1);

            'PCA'[SOCIETE]; PCA[CJOURNAL]; PCA[DTECRIT]; PCA[ANALYT]; --here is the modify i add all the column i need on this line of the code

            "TCOMPTE"; "48700000";

            "MDEBITS"; [Total_MDEBITS];

            "DCREDITS"; [Total_DCREDITS];

            "TLIB"; SELECTEDVALUE(PCA[LIB2])

        );

    "CJOURNAL"; PCA[CJOURNAL];

    "TCOMPTE"; "48700000";

    "CSOC";'PCA'[SOCIETE];

    "MDEBITS"; [Total_MDEBITS];

    "DCREDITS"; [Total_DCREDITS];

    "DECRIT"; PCA[DTECRIT];

    "CANALYT3"; 'PCA'[ANALYT];

    "TLIB"; SELECTEDVALUE(PCA[LIB2])

    );

    SELECTCOLUMNS(

        FILTER(ALL('PCA'); LEFT('PCA'[TCOMPTE]; 1) = "7");

        "CJOURNAL"; 'PCA'[CJOURNAL];

        "TCOMPTE"; 'PCA'[TCOMPTE];

        "CSOC"; 'PCA'[SOCIETE];

        "MDEBITS"; 'PCA'[DEBITS];

        "DCREDITS"; 'PCA'[CREDITS];

        "DECRIT"; 'PCA'[DTECRIT];

        "CANALYT3"; 'PCA'[ANALYT];

        "TLIB"; 'PCA'[LIB2]

    ))


     


    Thanks again  for your helping !