Forum Discussion

anupambit1797's avatar
anupambit1797
Iron Contributor
Jun 11, 2025
Solved

How to get the details on the Headers from PDF

Dear Experts,                  In all Attached PDFs, in chapter 5, there's a section of inter-band CA, which I am interested in a format like below:- How to achieve this ? Thanks in Advance, ...
  • SergeiBaklan's avatar
    SergeiBaklan
    Jun 15, 2025

    With data model we need

    1. first add another table with unique file names
    2.  Set relationships between it and main table

    3. Create new measure as

    Bands count:=COUNTA( Table1[Inter band CA(num)] ) + 0

    Please not, we plus zero to convert blanks to numbers

    4. Add KPI to that measure

    5. Create PivotTable using

    With that icons also will be in totals as well. 

    Perhaps it's easier to do everything with Power Query

    let
        Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
        DeclareType = Table.TransformColumnTypes(
            Source,
            {
                  {"File Name", type text}
                , {"Section Number", type text}
                , {"Inter band CA(num)", type text}
            }),
        NameForEmpty = Table.ReplaceValue(
            DeclareType, "", "band",
            Replacer.ReplaceValue,{"Inter band CA(num)"}),
        CountBands = Table.Pivot(
            NameForEmpty,
            List.Distinct(NameForEmpty[#"Inter band CA(num)"]), "Inter band CA(num)",
            "Section Number", List.Count)
    in
        CountBands

    pivoting inside. With that we have structured table to whic we may apply usual conditional formatting

Resources