John Liu Blog

Every drop counts

Hugo Tips

Add Hyperlink In Hugo markup, you can create hyperlink to reference either internal or external webpages. To reference internal (on the same site) page: [your title]({{< ref "/your reference file name.md" >}}) To referenc external page, hyperlink will open in a new tab: This one will add a line break after the hyperlink: we use the newtabref-newline Hugo shortcodes {{< newtabref-newline href="https://...." title="your title" >}} This one will not add a line break after the hyperlink: we use the newtabref-inline Hugo shortcodes {{< newtabref-inline href="https://.

Power BI Auto Select KPI using Field Parameter

(Note: at time of this post, both Field parameters and New card visual are still in preview. To use these two functions, go to File –> Options and settings –> Options –> Previw features, and turn on these features.) You might need to develop Power BI KPI report for different department/user with same visual format but different data. For example, a report with some card visual and line chart for different but targeting different KPI measures.

Power BI Page Navigation

For page navigation button, we can’t set icon as with normal button. However, if we add the icon as part of the page name, the button will show on the navigation button. To add an icon to the page name, hold Windows logo key + period (.) key. This will open the emoji window for you to pick an emoji icon. Apart from the Window emoji, you may find icons from unicode-table or vertex42

Power BI Smart Axis

When developing Power BI report with date slicer, the large date range might make the visual overwhelming if the X axis interval is on a fix date/week/month/quater interval. It would be helpful if the X axis can auto adjust the interval betwee date/week/month/quater/year. Assumed you have a date table dimDate in your report. We can add another AutoPeriod table (in Model View –> click on New table) to define the possible intervals for the axis:

Azure Cosmos DB study notes

TTL (time-to-live): max 2,147,483,647seconds (~68years) For TTL to work at either container or item level, it needs to be enable/configured at container level first. If only configured at item level, it will be ignored unless TTL is enabled/configured at container level default TTL is not configured max configureable TTL is ? Previsioned throughput vs. serverless: previsioned throughput is ideal for predictable traffic patterns that require sustained and predictable performance with minimal variance Serverless can handle wildly varying traffic and low average-to-peak traffic ratios