EricDong's avatar
EricDong
Icon for Advocate I rankAdvocate I
7 years ago

DAX Cheat Sheet - Success of CSS Selector

This report is sourcing from MS official DAX Reference site by using a dynamic way to extract the data based on CSS selector; Visit my blog for more Power BI tips and tricks: funbiworld.com

 

Methods:

Using CSS selector to directly retrieve Functions Name and Link from the parent (DAX Category) page.  Then use Custom Functions to get details per each Link.

 

Key M Scripts:

 

    Source = Web.BrowserContents(DaxGroupURL),
    #"Extracted Table From Html" = Html.Table(Source, {{"FunctionName", "[id*=""api-doc-contents""] > H1,[id*=""api-doc-contents""] > P,[id*=""api-doc-contents""] > H2"},{"Link",  "a[href]",  each [Attributes][href]}},[RowSelector="[id*=""api-doc-contents""] > H1,[id*=""api-doc-contents""] > P,[id*=""api-doc-contents""] > H2"]),

 

 

Custom Visuals:

Using Hierarchy Slicer and Text Filter to make a better browsing experience.

 

10 Replies

    • JasperS's avatar
      JasperS
      Frequent Visitor

      Hi Eric,

       

      Great job sir!

      is it possible you can send me the data file and pbix file for this?  would be very educational for me as a beginner and would realy help my learning

      • Tkb7117's avatar
        Tkb7117
        Frequent Visitor

        hi is it possble to receive the Pbix - thanks in advance

  • Nia's avatar
    Nia
    Regular Visitor

    Hi, this is so useful! Is it possble to receive the Pbix?

    Thank you

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hello,,

     

    This is awsome. Is it possible you can send me the pbix file for this? 

     

    [email protected]

     

    Thank you,

  • Anonymous's avatar
    Anonymous
    Not applicable

    EricDong , this is absolutely awesome and so useful!  By any chance, would you be willing to share the pbix file with me?  I'm hopeful that I can learn a lot from this.  Many thanks!

     

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

    Very useful information, Thanks for sharing

  • that an amazing work done by you. and helpful for everyone. well done.